Skip to content

Commit

Permalink
Remove HTList and add signals (#3291)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Cornu authored Dec 15, 2024
1 parent bf6a457 commit 6ab042f
Show file tree
Hide file tree
Showing 9 changed files with 74 additions and 256 deletions.
1 change: 0 additions & 1 deletion cmake/NeuronFileLists.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ set(IVOC_FILE_LIST
grglyph.cpp
grmanip.cpp
hocmark.cpp
htlist.cpp
idraw.cpp
ivoc.cpp
ivocmain.cpp
Expand Down
121 changes: 0 additions & 121 deletions src/ivoc/htlist.cpp

This file was deleted.

86 changes: 0 additions & 86 deletions src/ivoc/htlist.h

This file was deleted.

1 change: 0 additions & 1 deletion src/nrncvode/cvodeobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ extern int hoc_return_type_code;
#include "nrnpy.h"
#include "tqueue.hpp"
#include "mymath.h"
#include "htlist.h"
#include <nrnmutdec.h>

#if NRN_ENABLE_THREADS
Expand Down
5 changes: 3 additions & 2 deletions src/nrncvode/cvodeobj.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#pragma once

#include <list>

#include "nrnmpi.h"
#include "nrnneosm.h"
//#include "shared/nvector_serial.h"
Expand All @@ -16,7 +18,6 @@ struct BAMech;
struct NrnThread;
class PlayRecord;
class STEList;
class HTList;
namespace neuron {
struct model_sorted_token;
}
Expand Down Expand Up @@ -72,7 +73,7 @@ class CvodeThreadData {
Node** v_node_;
Node** v_parent_;
PreSynList* psl_th_; // with a threshold
HTList* watch_list_;
std::list<WatchCondition*>* watch_list_;
std::vector<neuron::container::data_handle<double>> pv_, pvdot_;
int nvoffset_; // beginning of this threads states
int nvsize_; // total number of states for this thread
Expand Down
15 changes: 8 additions & 7 deletions src/nrncvode/netcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

#undef check

#include "htlist.h"
#include "neuron/container/data_handle.hpp"
#include "nrnmpi.h"
#include "nrnneosm.h"
#include "pool.hpp"
#include "tqitem.hpp"
#include "utils/signal.hpp"

#include <InterViews/observe.h>

Expand Down Expand Up @@ -212,7 +212,7 @@ class ConditionEvent: public DiscreteEvent {
static unsigned long deliver_qthresh_;
};

class WatchCondition: public ConditionEvent, public HTList {
class WatchCondition: public ConditionEvent {
public:
WatchCondition(Point_process*, double (*)(Point_process*));
virtual ~WatchCondition();
Expand Down Expand Up @@ -242,16 +242,17 @@ class WatchCondition: public ConditionEvent, public HTList {

static unsigned long watch_send_;
static unsigned long watch_deliver_;

signal_<WatchCondition*> unregister;
};

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();
void deliver(double, NetCvode*, NrnThread*) override;
void pgvts_deliver(double t, NetCvode*) override;
double value() override;
NrnThread* thread() override;

STETransition* stet_;
};
Expand Down
Loading

0 comments on commit 6ab042f

Please sign in to comment.