Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fixed Size Arrays proposal

Similar presentations


Presentation on theme: "Fixed Size Arrays proposal"— Presentation transcript:

1 Fixed Size Arrays proposal
EPICS Developers Meeting 2014, Ljubljana, March 2014 Fixed Size Arrays proposal Matej Sekoranja

2 Rationale, naming pvData knows only unbounded variable length arrays
Flexibility is good, but kills performance (does not allow optimizations) In most cases arrays size if fixed or bounded I propose: variable size array, e.g. int[] bounded size array, e.g. int<1024> fixed size array, e.g. int[16] bounded size string, e.g. string<40>

3 Required changes Introspection interface API is affected, and its serialization “PVArray” needs minor changes to handle limits e.g. check if new capacity exceed maximum capacity, automatically allocate fixed size arrays public class Array : public Field { // 0 not valid value, means undefined std::size_t getMaximumCapacity(); std::size_t getFixedLength(); } public class ScalarArray / StructureArray / UnionArray : public Array { . . . public class StringScalar : public Scalar { std::size_t getMaximumCapacity()

4 Thank you!


Download ppt "Fixed Size Arrays proposal"

Similar presentations


Ads by Google