self.log_info('input gpot port data: '+str(self.pm['gpot'][self.in_gpot_ports])) # Do something with input spike data: self.log_info('input spike port data: '+str(self.pm['spike'][self.in_spike_ports])) # Output random graded potential data: out_gpot_data = np.random.rand(len(self.out_gpot_ports)) self.pm['gpot'][self.out_gpot_ports] = out_gpot_data self.log_info('output gpot port data: '+str(out_gpot_data)) # Randomly select output ports to emit spikes: out_spike_data = np.random.randint(0, 2, len(self.out_spike_ports)) self.pm['spike'][self.out_spike_ports] = out_spike_data self.log_info('output spike port data: '+str(out_spike_data)) logger = mpi.setup_logger(screen=True, file_name='neurokernel.log', mpi_comm=MPI.COMM_WORLD, multiline=True) man = Manager() m1_int_sel_in_gpot = '/a/in/gpot0,/a/in/gpot1' m1_int_sel_out_gpot = '/a/out/gpot0,/a/out/gpot1' m1_int_sel_in_spike = '/a/in/spike0,/a/in/spike1' m1_int_sel_out_spike = '/a/out/spike0,/a/out/spike1' m1_int_sel = ','.join([m1_int_sel_in_gpot, m1_int_sel_out_gpot, m1_int_sel_in_spike, m1_int_sel_out_spike]) m1_int_sel_in = ','.join((m1_int_sel_in_gpot, m1_int_sel_in_spike)) m1_int_sel_out = ','.join((m1_int_sel_out_gpot, m1_int_sel_out_spike)) m1_int_sel_gpot = ','.join((m1_int_sel_in_gpot, m1_int_sel_out_gpot)) m1_int_sel_spike = ','.join((m1_int_sel_in_spike, m1_int_sel_out_spike)) N1_gpot = SelectorMethods.count_ports(m1_int_sel_gpot) N1_spike = SelectorMethods.count_ports(m1_int_sel_spike)
str(self.pm['spike'][self.in_spike_ports])) # Output random graded potential data: out_gpot_data = gpuarray.to_gpu( np.random.rand(len(self.out_gpot_ports))) self.pm['gpot'][self.out_gpot_ports] = out_gpot_data self.log_info('output gpot port data: ' + str(out_gpot_data)) # Randomly select output ports to emit spikes: out_spike_data = gpuarray.to_gpu( np.random.randint(0, 2, len(self.out_spike_ports))) self.pm['spike'][self.out_spike_ports] = out_spike_data self.log_info('output spike port data: ' + str(out_spike_data)) logger = mpi.setup_logger(screen=True, file_name='neurokernel.log', mpi_comm=MPI.COMM_WORLD, multiline=True) man = Manager() m1_int_sel_in_gpot = '/a/in/gpot0,/a/in/gpot1' m1_int_sel_out_gpot = '/a/out/gpot0,/a/out/gpot1' m1_int_sel_in_spike = '/a/in/spike0,/a/in/spike1' m1_int_sel_out_spike = '/a/out/spike0,/a/out/spike1' m1_int_sel = ','.join([ m1_int_sel_in_gpot, m1_int_sel_out_gpot, m1_int_sel_in_spike, m1_int_sel_out_spike ]) m1_int_sel_in = ','.join((m1_int_sel_in_gpot, m1_int_sel_in_spike)) m1_int_sel_out = ','.join((m1_int_sel_out_gpot, m1_int_sel_out_spike)) m1_int_sel_gpot = ','.join((m1_int_sel_in_gpot, m1_int_sel_out_gpot))