History log of /frameworks/compile/slang/slang_rs_foreach_lowering.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
9319dfc974a82794d46e9f474f316590f480b976 26-Feb-2016 Yang Ni <yangni@google.com> slang error on kernel launch from another kernel

Bug: 27459075

Extended the AST visitor that lowers rsForEach() and
rsForEachWithOptions() calls to be aware if the function being walked
is a kernel itself. If so, on seeing a call to one of the two kernel
launch functions, reports a compiler error.

Note that such checking is oblivious to the control flow.

Also removed all checks inside the LowerRSForEachCall() function,
since we do all the same checks before entering that function.

Change-Id: Ib7f276e8e8d707f39b310548c084ed550a7a3480
(cherry picked from commit edfcc6949e2ae5374ba548d7543d6f815cf27b65)
1946749cebf4a64341d8210890688fef7d958c22 27-Oct-2015 Yang Ni <yangni@google.com> Launch options & multi inputs for single-source RS

Bug: 23535985

Also renamed rsParallelFor to rsForEach.
Added checks for number of allocations to rsForEach matching kernel function

Added slang tests.

Removed code from RSContext for remembering the rs_allocation AST subtree.

Change-Id: Ibc22bd5e9585a4471b15920ef60fe1fe2312de49
fb40ee2a90f37967bf4a40a18dec7f60e5c580d8 13-Oct-2015 Yang Ni <yangni@google.com> Revert "Revert "Handle kernel launch calls""

Bug: 23535985

This reverts commit 5d9263d3a3a7457b9e5fe6e518c0d822dcdfcda6.

This also fixes issues in change list 172074, which caused some
slang tests to fail due to changed hehavior in error handling.

The fix was based on changes originally posted by srhines@.

To keep single-source functionality working, I separated kernel
name logging from the final export processing code. We would
build a map from kernel funciton names to slot numbers as we parse
the script. The map is used when translating a rsParallelFor call
to a call to the internal rsForEachInternal API, so that we can find
the proper slot numbers.

Here is Steve's original commit message.

Only call processExports() after a successful C99 compilation.

This refactoring fixes a bug in the previous single-source patch, where
exported functions/variables/kernels were being processed during the
regular compilation steps. This wastes compile time, since we don't need
to actually prepare for outputting reflected Java/C++ code if the
compile is going to fail for regular C99 reasons.

Change-Id: I81d88731188f4258f12f4c90ae8dd8abc8c2d641
5d9263d3a3a7457b9e5fe6e518c0d822dcdfcda6 13-Oct-2015 Stephen Hines <srhines@google.com> Revert "Handle kernel launch calls"

This reverts commit 45aa8c52c9400cef86efe4343f04e605a66f42af.

Change-Id: If33ad432e4381d1dc64ef884b51eb50f707807ff
45aa8c52c9400cef86efe4343f04e605a66f42af 14-Sep-2015 Yang Ni <yangni@google.com> Handle kernel launch calls

Bug: 23535985

Find rsParallelFor(void*, ...) calls in the .rs source code and
translate them into rsForEachInternal(int, rs_allocation, rs_allocation)

Semantic checks are pretty limited at this point. Will enhance them in followup CLs.

Change-Id: I6e2cf3db868f426aa8e0b9a77732b66c1e6b9f03