17 #ifndef MULTITHREADING 21 #define MULTITHREADING 1 29 #define THREADFACTOR 1 32 #ifndef D_NEIGHBORFACTOR 37 #define D_NEIGHBORFACTOR 1 40 #ifndef ID_NEIGHBORFACTOR 45 #define ID_NEIGHBORFACTOR 1 62 #define ENERGY_FACTOR 1 70 #define ENERGY_WEIGHT 1 78 #define DELTA_FACTOR 1 86 #define SLOPE_FACTOR 1 94 #define SLOPE_WEIGHT 1 int num_obervationnodes
The number of nodes to observe.
Definition: definitions.h:221
nodeval_t * timeseries
Series of observed node energy levels.
Definition: definitions.h:139
int thread_start_x
Node x index at which to start working in this thread (inclusive).
Definition: definitions.h:255
kernelfunc_t id_ptr
Function pointer pointing to the kernel function for the indirect neighborhood.
Definition: definitions.h:270
pthread_t threadhandle_t
Platform-independent thread handle.
Definition: definitions.h:105
nodeval_t ** new_state
2D array of nodes with the new energy level.Values will be overwritten.Size number_nodes_x * number_n...
Definition: definitions.h:237
int num_ticks
Number of ticks in the simulation.
Definition: definitions.h:201
nodeinputseries_t ** partial_inputs
Points the the inputs in the sub-grid of this partial simulation.
Definition: definitions.h:295
pthread_barrier_t threadbarrier_t
Platform-independent thread barrier.
Definition: definitions.h:114
int number_partial_inputs
Number of inputs in the sub-grid of this partial simulation.
Definition: definitions.h:287
double nodeval_t
Type that the nodes in the brainsimulation use to store their energy level.
Definition: definitions.h:120
int thread_end_x
Node x index at which to stop working in this thread (exclusive).
Definition: definitions.h:260
int timeseries_ticks
Length of timeseries.
Definition: definitions.h:143
nodeinputseries_t * global_inputs
Contains information about the coordinates and the values of all input nodes to be changed during exe...
Definition: definitions.h:281
nodeval_t slope
Slope of node.
Definition: definitions.h:183
Struct to store the results of a simulation for a single observed node.
Definition: definitions.h:126
int number_nodes_y
The number of total nodes in the second dimension of nodes.
Definition: definitions.h:216
kernelfunc_t d_ptr
Function pointer pointing to the kernel function for the direct neighborhood.
Definition: definitions.h:265
nodetimeseries_t * observationnodes
Timeseries to write the observations into.
Definition: definitions.h:226
nodeval_t ** old_state
2D array of nodes with their current energy level.Size number_nodes_x * number_nodes_y.
Definition: definitions.h:231
int x_index
x index of the node.
Definition: definitions.h:130
nodeval_t act
Energy-level of node.
Definition: definitions.h:179
int(* kernelfunc_t)(nodeval_t *, int, int, nodeval_t **, int, int)
Definition of the kernel-function interface.
Definition: definitions.h:190
int number_nodes_x
The number of total nodes in the first dimension of nodes.
Definition: definitions.h:211
nodeval_t **** kernels
2D array containing the kernels of each node at each index.Each index node points to an array contain...
Definition: definitions.h:250
double tick_ms
Milliseconds in between each simulation tick.
Definition: definitions.h:206
Struct to pass all execution information to a new thread for executing a tick (or parts thereof)...
Definition: definitions.h:196
nodeval_t ** slopes
2D array of nodes with their slope from the last tick iteration level.
Definition: definitions.h:243
int number_global_inputs
Number of inputs on the entire node grid.
Definition: definitions.h:275
Struct to store the status of one node.
Definition: definitions.h:175
int y_index
y index of the node.
Definition: definitions.h:134
threadbarrier_t * barrier
Barrier to wait at.
Definition: definitions.h:300