Improve write array in buffer for basic types
Current implementation of SOPC_Write_Array
call the encoder function for each element of the array. In the case of simple structures as Bytes, UInt64 and other structures without pointers, this method leads to successive call to memcpy
to directly neigbhor position which is significantly inefficient.
SOPC_Write_Array
should have two distinct behaviors for basic data (which can be copied byte per byte) and complex data (which requires specific encoding process). In the first case a direct copy of all the data in the array on the buffer should be enough, and the current implementation could be kept for complex structures.
Edited by Jérémie Chabod