-
Notifications
You must be signed in to change notification settings - Fork 0
/
localNetProcess.h
76 lines (65 loc) · 1.9 KB
/
localNetProcess.h
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
76
// localNetProcess.h
// Distributed Plastic Spiking Neural Network, Simulation Engine
// DPSNN_*.*
// AUTHOR: Pier Stanislao Paolucci (Roma, Italy, 2011-...),
// AUTHOR: Elena Pastorelli (2013-...)
// AUTHOR: ...
// AUTHOR: plus other members of INFN Lab, Roma, Italy
#include <stdio.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include <stdint.h>
#include <stdlib.h>
#ifndef localNet_H
#define localNet_H
#include "DPSNN_environmentSelection.h"
#include "DPSNN_parameters.h"
#include "DPSNN_random.h"
#include "DPSNN_neuron.h"
#include "DPSNN_messagePassing.h"
#include "DPSNN_spike.h"
#include "DPSNN_localNet.h"
#include "DPSNN_stopWatch.h"
#include "DPSNN_stat.h"
#define PORT_I "i"
#define PORT_O "o"
#ifdef DALonlyEnvironmentSelected
//#define GLOBH 8
#else
#ifdef MPIandDALenvironmentSelected
#define GLOBH MPIglobH
#else
#error "missing selection between DALonlyEnvironmentSelected and MPIandDALenvironmentSelected"
#endif
#endif
#define EVENT_stop_fsm 0
#define MAX_FIRE_COUNT 2
#define MSG_SYNAPSE_INIT_COMPLETED 75640000
#define MSG_SYNC_COMPLETED 75640001
#define MSG_FIRE 75640002
class localNetClass;
typedef struct _local_states
{
struct DPSNN_parameters parameters;
localNetClass localNeuralNetObject; //only 1 cluster of neurons per process
messagePassingClass messagePassing;
stopWatchClass stopWatch;
statClass stat;
//several of next data could be removed once running under DAL
int id;
char name[32];
int globH;
int fireCount;
int syncMessage;
} localNetProcess_localState;
#define lnp_ls_par p->local->parameters
#define lnp_ls_neuralNet p->local->localNeuralNetObject
#define lnp_ls_messagePassing p->local->messagePassing
#define lnp_ls_stopWatch p->local->stopWatch
#define lnp_ls_stat p->local->stat
#define EVENT_stop_fsm 0
void localNetProcess_init(DALProcess *);
int localNetProcess_fire(DALProcess *);
void localNetProcess_finish(DALProcess *);
#endif