Double buffering and latency

Since this is a simulation on a serial machine, the cells can only be updated sequentially. We use a standard technique for avoiding weird effects due to the possible ordering up the updates of the states of the simulation components (the cells) by double-buffering the cells. That means that at each time step, the cells inputs come from the outputs of the cells at the previous time step. The new outputs of all the cells are computed but are not used until after all the cells' new states are computed. Then, in a separate iteration over all the cells, all the cells output are updated to the ones that were just computed.

Latency

This double-buffering means that any changes need to be propogated through all levels of the simulation. A change to the stimulus will appear at the output of a photoreceptor after one simulation cycle, but will only appear at a cortical cell after approximately 5 cycles.