#include #include #include #include #include "everything_else.hpp" #include "index.hpp" #include "index_spike.hpp" #include "mempool.hpp" using namespace std; int main(int argc, char **argv) { // read cmd line params assert(argc == 4); errno = 0; char *tail; Ptr addr(strtoul(argv[1], &tail, 10)); assert(*tail == 0); Time start(strtod( argv[2], &tail)); assert(*tail == 0); Time stop(strtod( argv[3], &tail)); assert(*tail == 0); assert(errno == 0); assert(addr() < Ptr::numInstances()); assertSimDir(); { // go to first spike with time >= start Index idx; Ptr::ptr_t cur(idx.first(start, addr)); // no spike found? if (cur == idx.nil()) return 0; // output cout << "# time of outgoing spikes from neuron " << addr() << " between " << start() << " and " << stop() << endl; while (cur != idx.nil() && idx.time(cur) <= stop) { cout << idx.time(cur) << endl; cur = idx.next(cur); } } return 0; }