Add helper functions to create allocations
Bug: 23535985
- Adds high-level helper functions such as rsCreateAllocation_char4 etc
to the API.
- To accomplish this, adds "#RST_i" pattern replacement to the
generator. Similar to replacement of #1 with the equivalent parameter
in the spec, the generator now replaces '#RST_i' patterns with the RS
type equivalent of the parameter. For e.g.:
"
...
t: i8, i16 # assume this is the first "replaceable" list in this spec
...
inline:
rsCreateElement(RS_TYPE_#RST_1)
"
will generate
- "rsCreateElement(RS_TYPE_SIGNED_8)" and
- "rsCreateElement(RS_TYPE_SIGNED_16)"
respectively.
Change-Id: I162e3f3b9d89d477bf85e12dd300fd5b949dbd4b
3 files changed