next up previous contents index
Next: The SicVar class Up: How SIC variables are Previous: How SIC variables are   Contents   Index

Comments on the strategy

Concerning variables handling from both SIC and Python, the first priority was to manage the same data in memory from the two processes, e.g. a modification of a variable in one process should be instantaneously visible in the other with no particular resynchronization.

Another consideration is that Python does not natively handle multi-dimensionnal arrays. This feature can be easily added, but we need the NumPy package.

It appeared quite naturally that the solution was to use the PyArray_SimpleNewFromData() function of the NumPy C-API: it can construct a numpy.ndarray from the memory address of an array, its dimensions and its datatype.

With this feature the strategy can be summarized as follow:


next up previous contents index
Next: The SicVar class Up: How SIC variables are Previous: How SIC variables are   Contents   Index
Gildas manager 2023-06-01