From d4686281a5ad7292305bda786d3bc24ccff3249b Mon Sep 17 00:00:00 2001 From: golosio Date: Wed, 18 Nov 2020 23:11:06 +0100 Subject: [PATCH] Fixed problem with ResetConnectionSpikeTime Up and Down --- configure | 20 ++++++++++---------- configure.ac | 2 +- src/neurongpu.cu | 12 +++++++----- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/configure b/configure index fcdeca9..8b7d401 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for neurongpu 1.6.2. +# Generated by GNU Autoconf 2.69 for neurongpu 1.6.4. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='neurongpu' PACKAGE_TARNAME='neurongpu' -PACKAGE_VERSION='1.6.2' -PACKAGE_STRING='neurongpu 1.6.2' +PACKAGE_VERSION='1.6.4' +PACKAGE_STRING='neurongpu 1.6.4' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1364,7 +1364,7 @@ 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 neurongpu 1.6.2 to adapt to many kinds of systems. +\`configure' configures neurongpu 1.6.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1435,7 +1435,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of neurongpu 1.6.2:";; + short | recursive ) echo "Configuration of neurongpu 1.6.4:";; esac cat <<\_ACEOF @@ -1553,7 +1553,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -neurongpu configure 1.6.2 +neurongpu configure 1.6.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2093,7 +2093,7 @@ 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 neurongpu $as_me 1.6.2, which was +It was created by neurongpu $as_me 1.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -11965,7 +11965,7 @@ fi # Define the identity of the package. PACKAGE='neurongpu' - VERSION='1.6.2' + VERSION='1.6.4' cat >>confdefs.h <<_ACEOF @@ -17952,7 +17952,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by neurongpu $as_me 1.6.2, which was +This file was extended by neurongpu $as_me 1.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18018,7 +18018,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -neurongpu config.status 1.6.2 +neurongpu config.status 1.6.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index e35924c..5a38b47 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ([2.65]) -AC_INIT([neurongpu], [1.6.2], []) +AC_INIT([neurongpu], [1.6.4], []) # Config initialization AC_CONFIG_SRCDIR([m4/ct_check_cuda.m4]) diff --git a/src/neurongpu.cu b/src/neurongpu.cu index c56fed0..b854c15 100644 --- a/src/neurongpu.cu +++ b/src/neurongpu.cu @@ -419,11 +419,13 @@ int NeuronGPU::SimulationStep() int time_idx = (int)round(neur_t0_/time_resolution_) + it_ + 1; gpuErrchk(cudaMemcpyToSymbol(NeuronGPUTimeIdx, &time_idx, sizeof(int))); - if ( (time_idx & 0xffff) == 0x8000) { - ResetConnectionSpikeTimeUp(net_connection_); - } - else if ( (time_idx & 0xffff) == 0) { - ResetConnectionSpikeTimeDown(net_connection_); + if (ConnectionSpikeTimeFlag) { + if ( (time_idx & 0xffff) == 0x8000) { + ResetConnectionSpikeTimeUp(net_connection_); + } + else if ( (time_idx & 0xffff) == 0) { + ResetConnectionSpikeTimeDown(net_connection_); + } } for (unsigned int i=0; i