diff options
author | Chris Wailes <chriswailes@google.com> | 2014-07-16 15:18:30 -0700 |
---|---|---|
committer | Chris Wailes <chriswailes@google.com> | 2014-08-15 18:26:36 -0700 |
commit | f37121300217d3b39ab66dd9c8881bcbcad932df (patch) | |
tree | 2e06a02e490f318cc03b95b03112860e3d38e9a6 /rsScriptC_Lib.cpp | |
parent | cd8df40f07d88f896bea05ed06a20d1a4d5e9728 (diff) | |
download | rs-f37121300217d3b39ab66dd9c8881bcbcad932df.tar.gz |
Collapse code paths for single- and multi-input kernels.
This patch simplifies the RenderScript driver and CPU reference implementation
by removing the distinction between sing- and multi-input kernels in many
places. The distinction is maintained in some places due to the need to
maintain backwards compatibility. This permits the deletion of some functions
and struct members that are no longer needed. Several related functions were
also cleaned up.
Change-Id: Id70a223ea5e3aa2b0b935b2b7f9af933339ae8a4
Diffstat (limited to 'rsScriptC_Lib.cpp')
-rw-r--r-- | rsScriptC_Lib.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/rsScriptC_Lib.cpp b/rsScriptC_Lib.cpp index a41f4a79..cacb37ad 100644 --- a/rsScriptC_Lib.cpp +++ b/rsScriptC_Lib.cpp @@ -230,7 +230,17 @@ void rsrForEach(Context *rsc, Allocation *in, Allocation *out, const void *usr, uint32_t usrBytes, const RsScriptCall *call) { - target->runForEach(rsc, /* root slot */ 0, in, out, usr, usrBytes, call); + + if (in == NULL) { + target->runForEach(rsc, /* root slot */ 0, NULL, 0, out, usr, + usrBytes, call); + + } else { + const Allocation *ins[1] = {in}; + target->runForEach(rsc, /* root slot */ 0, ins, + sizeof(ins) / sizeof(RsAllocation), out, usr, + usrBytes, call); + } } void rsrAllocationSyncAll(Context *rsc, Allocation *a, RsAllocationUsageType usage) { |