NEST  2.6.0,not_revisioned_source_dir@0
nestmodule.h
Go to the documentation of this file.
1 /*
2  * nestmodule.h
3  *
4  * This file is part of NEST.
5  *
6  * Copyright (C) 2004 The NEST Initiative
7  *
8  * NEST is free software: you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation, either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * NEST is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with NEST. If not, see <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #ifndef NESTMODULE_H
24 #define NESTMODULE_H
25 
26 #include "slimodule.h"
27 #include "slitype.h"
28 #include "slifunction.h"
29 #include "dict.h"
30 
31 #include "network.h"
32 #include "scheduler.h"
33 #include "event.h"
34 #include "exceptions.h"
35 
36 namespace nest
37 {
38  class Node;
39 
46  class NestModule: public SLIModule
47  {
48  public:
49 
52 
53  NestModule();
54  ~NestModule();
55 
65  static void register_network(Network&);
66 
67  void init(SLIInterpreter *);
68 
69  const std::string commandstring(void) const;
70  const std::string name(void) const;
71 
77 
81  static Network &get_network();
82 
90  static index get_num_threads();
91 
93 
165 
167  {
168  public:
169  void execute(SLIInterpreter *) const;
171 
173  {
174  public:
175  void execute(SLIInterpreter *) const;
177 
179  {
180  public:
181  void execute(SLIInterpreter *) const;
183 
185  {
186  public:
187  void execute(SLIInterpreter *) const;
189 
191  {
192  public:
193  void execute(SLIInterpreter *) const;
195 
197  {
198  public:
199  void execute(SLIInterpreter *) const;
201 
203  {
204  public:
205  void execute(SLIInterpreter *) const;
207 
209  {
210  public:
211  void execute(SLIInterpreter *) const;
213 
215  {
216  public:
217  void execute(SLIInterpreter *) const;
219 
221  {
222  public:
223  void execute(SLIInterpreter *) const;
225 
227  {
228  public:
229  void execute(SLIInterpreter *) const;
230  } cva_cfunction;
231 
233  {
234  public:
235  void execute(SLIInterpreter *) const;
237 
239  {
240  public:
241  void execute(SLIInterpreter *) const;
243 
245  {
246  public:
247  void execute(SLIInterpreter *) const;
249 
251  {
252  public:
253  void execute(SLIInterpreter *) const;
255 
257  {
258  public:
259  void execute(SLIInterpreter *) const;
261 
263  {
264  public:
265  void execute(SLIInterpreter *) const;
267 
269  {
270  public:
271  void execute(SLIInterpreter *) const;
273 
275  {
276  public:
277  void execute(SLIInterpreter *) const;
279 
281  {
282  public:
283  void execute(SLIInterpreter *) const;
285 
287  {
288  public:
289  void execute(SLIInterpreter *) const;
291 
293  {
294  public:
295  void execute(SLIInterpreter *) const;
297 
299  {
300  public:
301  void execute(SLIInterpreter *) const;
303 
305  {
306  public:
307  void execute(SLIInterpreter *) const;
309 
311  {
312  public:
313  void execute(SLIInterpreter *) const;
315 
317  {
318  public:
319  void execute(SLIInterpreter *) const;
321 
323  {
324  public:
325  void execute(SLIInterpreter *) const;
327 
329  {
330  public:
331  void execute(SLIInterpreter *) const;
333 
335  {
336  public:
337  void execute(SLIInterpreter *) const;
339 
341  {
342  public:
343  void execute(SLIInterpreter *) const;
345 
347  {
348  public:
349  void execute(SLIInterpreter *) const;
351 
353  {
354  public:
355  void execute(SLIInterpreter *) const;
357 
359  {
360  public:
361  void execute(SLIInterpreter *) const;
363 
365  {
366  void execute(SLIInterpreter *) const;
368 
370  {
371  void execute(SLIInterpreter *) const;
373 
374  class RankFunction : public SLIFunction
375  {
376  void execute(SLIInterpreter *) const;
377  } rankfunction;
378 
380  {
381  void execute(SLIInterpreter *) const;
383 
385  {
386  void execute(SLIInterpreter *) const;
388 
390  {
391  void execute(SLIInterpreter *) const;
393 
395  {
396  void execute(SLIInterpreter *) const;
398 
400  {
401  void execute(SLIInterpreter *) const;
403 
405  {
406  void execute(SLIInterpreter *) const;
408 
410  {
411  void execute(SLIInterpreter *) const;
413 
415  {
416  void execute(SLIInterpreter *) const;
418 
420  {
421  void execute(SLIInterpreter *) const;
423 
424 #ifdef HAVE_MPI
426  {
427  void execute(SLIInterpreter *) const;
429 #endif
430 
432  {
433  void execute(SLIInterpreter *) const;
435 
437  {
438  void execute(SLIInterpreter *) const;
440 
442  {
443  void execute(SLIInterpreter *) const;
445 
447  {
448  void execute(SLIInterpreter *) const;
450 
452  {
453  void execute(SLIInterpreter *) const;
455 
457  {
458  void execute(SLIInterpreter *) const;
460 
462  {
463  void execute(SLIInterpreter *) const;
464  } size_gfunction;
465 
466 #ifdef HAVE_MUSIC
468  {
469  void execute(SLIInterpreter *) const;
471 
473  {
474  void execute(SLIInterpreter *) const;
476 #endif
477 
479 
480  private:
481 
493  static Network *net_;
494  };
495 
496  inline
498  {
499  assert(net_ != 0);
500  return *net_;
501  }
502 
503  inline
505  {
506  if ( net_ == 0 )
507  return 1; // module not initialized, thus certainly single thread
508  else
509  return net_->get_num_threads();
510  }
511 
512 } // namespace
513 
514 #endif
size_t index
Unsigned long type for enumerations.
Definition: nest.h:109
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1609
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1421
Definition: nestmodule.h:166
NestModule()
Definition: nestmodule.cpp:65
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1663
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:497
nest::NestModule::Cva_CFunction cva_cfunction
nest::NestModule::Cvgidcollection_iaFunction cvgidcollection_iafunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1527
Definition: nestmodule.h:431
nest::NestModule::SetFakeNumProcessesFunction_i setfakenumprocesses_ifunction
Definition: nestmodule.h:472
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:974
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1806
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1721
static Network * net_
Pointer to network.
Definition: nestmodule.h:493
Definition: nestmodule.h:244
nest::NestModule::PrintNetworkFunction printnetworkfunction
nest::NestModule::TimeCommunicationAlltoall_i_iFunction timecommunicationalltoall_i_ifunction
Definition: nestmodule.h:262
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1830
nest::NestModule::Cvgidcollection_ivFunction cvgidcollection_ivfunction
Definition: nestmodule.h:441
nest::NestModule::SetStatus_aaFunction setstatus_aafunction
nest::NestModule::Cvgidcollection_i_iFunction cvgidcollection_i_ifunction
Definition: nestmodule.h:226
nest::NestModule::RankFunction rankfunction
Definition: nestmodule.h:208
nest::NestModule::CopyModel_l_l_DFunction copymodel_l_l_Dfunction
nest::NestModule::SimulateFunction simulatefunction
Definition: nestmodule.h:172
Definition: nestmodule.h:196
Definition: nestmodule.h:238
static index get_num_threads()
Get number of threads.
Definition: nestmodule.h:504
Definition: slifunction.h:35
Definition: nestmodule.h:214
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:901
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:581
nest::NestModule::RConvergentConnect_ia_i_i_da_da_b_b_lFunction rconvergentconnect_ia_i_i_da_da_b_b_lfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1781
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1404
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1818
nest::NestModule::SetNumRecProcessesFunction_i setnumrecprocesses_ifunction
Definition: nestmodule.h:250
Definition: nestmodule.h:202
nest::NestModule::SetStatus_CDFunction setstatus_CDfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1640
Definition: nestmodule.h:394
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:721
static void register_network(Network &)
Set pointer to network.
Definition: nestmodule.cpp:81
Definition: nestmodule.h:256
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:533
nest::NestModule::Connect_i_i_D_lFunction connect_i_i_D_lfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1177
Definition: nestmodule.h:274
assert(pNet!=0)
nest::NestModule::SetDefaults_l_DFunction setdefaults_l_Dfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:872
nest::NestModule::GetStatus_iFunction getstatus_ifunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1555
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1511
Definition: nestmodule.h:178
nest::NestModule::SetStatus_idFunction setstatus_idfunction
nest::NestModule::GetStatus_CFunction getstatus_Cfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:680
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:195
Definition: nestmodule.h:425
nest::NestModule::NumProcessesFunction numprocessesfunction
const std::string name(void) const
Return name of the module.
Definition: nestmodule.cpp:89
nest::NestModule::RConvergentConnect_ia_ia_ia_daa_daa_b_b_lFunction rconvergentconnect_ia_ia_ia_daa_daa_b_b_lfunction
nest::NestModule::TimeCommunication_i_i_bFunction timecommunication_i_i_bfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:351
nest::NestModule::SyncProcessesFunction syncprocessesfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1073
Definition: nestmodule.h:232
nest::NestModule::ChangeSubnet_iFunction changesubnet_ifunction
~NestModule()
Definition: nestmodule.cpp:72
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:118
nest::NestModule::ProcessorNameFunction processornamefunction
Definition: nestmodule.h:419
nest::NestModule::MPIAbort_iFunction mpiabort_ifunction
Definition: nestmodule.h:268
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1793
nest::NestModule::DataConnect_i_D_sFunction dataconnect_i_D_sfunction
nest::NestModule::TimeCommunicationAlltoallv_i_iFunction timecommunicationalltoallv_i_ifunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:833
nest::NestModule::SetMaxBufferedFunction setmaxbuffered_l_ifunction
Definition: nestmodule.h:280
nest::NestModule::GetGlobalRngFunction getglobalrngfunction
nest::NestModule::GetChildren_i_D_bFunction getchildren_i_D_bfunction
Declarations for class Network.
Definition: nestmodule.h:436
nest::NestModule::Cvdict_CFunction cvdict_Cfunction
nest::NestModule::GetNodes_i_D_b_bFunction getnodes_i_D_b_bfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:363
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1488
nest::NestModule::ResetKernelFunction resetkernelfunction
void init(SLIInterpreter *)
Initialise the module.
Definition: nestmodule.cpp:1883
nest::NestModule::Size_gFunction size_gfunction
thread get_num_threads() const
Get number of threads.
Definition: network.h:984
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1097
nest::NestModule::MemoryInfoFunction memoryinfofunction
Definition: interpret.h:69
Main administrative interface to the network.
Definition: network.h:135
nest::NestModule::GetVpRngFunction getvprngfunction
Definition: slitype.h:49
const std::string commandstring(void) const
Return sli command sequence to be executed for initialisation.
Definition: nestmodule.cpp:94
nest::NestModule::GetStatus_aFunction getstatus_afunction
nest::NestModule::ResetNetworkFunction resetnetworkfunction
nest::NestModule::ConvergentConnect_ia_i_a_a_lFunction convergentconnect_ia_i_a_a_lfunction
static SLIType ConnectionType
Definition: nestmodule.h:50
Definition: nestmodule.h:379
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1582
nest::NestModule::ResumeSimulationFunction resumesimulationfunction
Definition: nestmodule.h:184
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:671
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:559
nest::NestModule::Connect_i_i_d_d_lFunction connect_i_i_d_d_lfunction
Definition: nestmodule.h:292
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1771
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1151
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:929
nest::NestModule::GetConnections_DFunction getconnections_Dfunction
nest::NestModule::RDivergentConnect_i_i_ia_da_da_b_b_lFunction rdivergentconnect_i_i_ia_da_da_b_b_lfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:414
nest::NestModule::Create_l_iFunction create_l_ifunction
static Network & get_network()
Return a reference to the network managed by nestmodule.
Definition: nestmodule.h:497
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:845
nest::NestModule::DivergentConnect_i_ia_a_a_lFunction divergentconnect_i_ia_a_a_lfunction
nest::NestModule::GetDefaults_lFunction getdefaults_lfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:384
nest::NestModule::TimeCommunicationv_i_iFunction timecommunicationv_i_ifunction
nest::NestModule::DataConnect_aFunction dataconnect_afunction
Definition: nestmodule.h:369
nest::NestModule::SetAcceptableLatencyFunction setacceptablelatency_l_dfunction
Base class for all SLI Interpreter modules.
Definition: slimodule.h:34
nest::NestModule::RestoreNodes_aFunction restorenodes_afunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:229
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:243
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1033
nest::NestModule::Connect_i_i_lFunction connect_i_i_lfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1465
Definition: nestmodule.h:352
nest::NestModule::Connect_g_g_D_DFunction connect_g_g_D_Dfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:750
SLI interface of the NEST kernel.
Definition: nestmodule.h:46
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1856
Definition: nestmodule.h:358
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1203
Definition: nestmodule.h:310
static SLIType GIDCollectionType
Definition: nestmodule.h:51
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:800
Definition: nestmodule.h:364
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1242
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1869
Definition: nestmodule.h:316
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:1378
nest::NestModule::GetLeaves_i_D_bFunction getleaves_i_D_bfunction
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:180
Definition: nestmodule.h:461
nest::NestModule::CurrentSubnetFunction currentsubnetfunction
Definition: nestmodule.h:220
Definition: nestmodule.h:298
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:467
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:144
Definition: nestmodule.h:374
void execute(SLIInterpreter *) const
Definition: nestmodule.cpp:648