neurokernel.pm_gpu.GPUPortMapper¶
-
class
neurokernel.pm_gpu.
GPUPortMapper
(selector, data=None, portmap=None, make_copy=True)[source]¶ Maps a PyCUDA GPUArray to/from path-like port identifiers.
-
__init__
(selector, data=None, portmap=None, make_copy=True)¶ x.__init__(…) initializes x; see help(type(x)) for signature
Methods
__init__
(selector[, data, portmap, make_copy])x.__init__(…) initializes x; see help(type(x)) for signature copy
()Return copy of this port mapper. equals
(other)Check whether this mapper is equivalent to another mapper. from_index
(idx, data[, portmap])Create port mapper from a Pandas index and a sequence of integer indices. from_pm
(pm)Create a new port mapper instance given an existing instance. get
(selector)Retrieve mapped data specified by given selector. get_by_inds
(inds)Retrieve mapped data specified by integer index. get_inds_nonzero
()Select indices of ports with nonzero data. get_map
(selector)Retrieve integer indices associated with selector. get_ports
(f)Select ports using a data selection function. get_ports_as_inds
(f)Select integer indices corresponding to ports in map. get_ports_nonzero
()Select ports with nonzero data. inds_to_ports
(inds)Convert list of integer indices to port identifiers. ports_to_inds
(selector)Convert port selector to list of integer indices. set
(selector, data)Set mapped data specified by given selector. set_by_inds
(inds, data)Set mapped data by integer indices. set_by_inds_array
(inds, data)Set mapped data with array by integer indices. set_by_inds_scalar
(inds, data)Set mapped data with scalar by integer indices. set_map
(selector, portmap)Set mapped integer index associated with selector. Attributes
data
Data associated with ports. data_ctype
C type corresponding to type of data array. dtype
Port mapper data type. index
Port mapper index. -