40bac5d72af8fe32ab3d0bb38aafb5c65d8d9dfa |
|
09-May-2016 |
Yang Ni <yangni@google.com> |
Disallow launching old-style kernels via rsForEach Bug: 28666819 The "kernel" attribute should be the sole criterion for a kernel function launchable via rsForEach() in single-source RS. (The utility function isRSForEachFunc() considers a super set of such functions as kernels, including old-style kernels or any function that returns void and has a pointer type first parameter, which don't have the "kernel" attribute.) Launching an old-style kernel is forbidden via an rsForEach() or rsForEachWithOptions() call. Old-style kernels can still co-exist in the same script with such a call, and can be launched via Java or C++ reflected code. To make this coexisting possible, old-style kernels are moved to the end of the list for exported kernels in the metadata. This way, the single-source RS frontend pass can agree with the metadata on the slot assignment for "new-style" kernels. Change-Id: I3d61c1c91b29043f3597ae622ef7c2ef972eb789
/frameworks/compile/slang/tests/P_foreach/foreach.rs
|