helios.layouts.ipc_tools

Inter-Process communication tools

This Module provides some objects to deal with inter-process communication

Classes

class helios.layouts.ipc_tools.GenericArrayBufferManager(dimension, dtype='float64', num_elements=None)[source]

This implements a abstract (generic) ArrayBufferManager.

The GenericArrayBufferManager is used for example to share the positions, edges and weights between different process.

Parameters
  • dimension (int) –

  • dtype (dtype) –

  • num_elements (int, optional) – In MacOs a shared memory resource can be created with a different number of elements then the original data

class helios.layouts.ipc_tools.SharedMemArrayManager(dimension, dtype, data=None, buffer_name=None, num_elements=None)[source]

An implementation of a GenericArrayBufferManager using SharedMemory

Parameters
  • dimension (int) – number of columns

  • dtype (str) – type of the ndarray

  • data (ndarray) – bi-dimensional array

  • buffer_name (str) – buffer_name, if you pass that, then this Obj. will try to load the memory resource

  • num_elements (int, optional) – In MacOs a shared memory resource can be created with a different number of elements then the original data

class helios.layouts.ipc_tools.ShmManagerMultiArrays[source]

This Obj. allows to deal with multiple arrays stored using SharedMemory