diff options
author | David Gross <dgross@google.com> | 2016-06-15 18:44:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2016-06-15 18:44:04 +0000 |
commit | b577d6194c5a5c7f37119072e4466feb83b8f71d (patch) | |
tree | e93d72962e01e77687f307ed1159c192dfe36e56 /rsScriptC.cpp | |
parent | e9794ac671fce6370eb180e520ed617afd30b4bc (diff) | |
parent | fc7ab793ea2db91f330272d9470433bbb1a505ce (diff) | |
download | rs-b577d6194c5a5c7f37119072e4466feb83b8f71d.tar.gz |
Merge changes from topic 'generalReductionDelete'
* changes:
Delete simple reduction implementation.
Add HAL version check, with fallback to CPU reference driver on failure.
Diffstat (limited to 'rsScriptC.cpp')
-rw-r--r-- | rsScriptC.cpp | 30 |
1 files changed, 5 insertions, 25 deletions
diff --git a/rsScriptC.cpp b/rsScriptC.cpp index 351aa4cd..fb808a6f 100644 --- a/rsScriptC.cpp +++ b/rsScriptC.cpp @@ -224,33 +224,13 @@ void ScriptC::runForEach(Context *rsc, } } -void ScriptC::runReduce(Context *rsc, uint32_t slot, const Allocation *ain, +void ScriptC::runReduce(Context *rsc, uint32_t slot, + const Allocation ** ains, size_t inLen, Allocation *aout, const RsScriptCall *sc) { - // TODO: Record the name of the kernel in the tracing information. - ATRACE_CALL(); - - if (slot >= mHal.info.exportedReduceCount) { - rsc->setError(RS_ERROR_BAD_SCRIPT, "The simple reduce kernel index is out of bounds"); - return; - } - if (mRSC->hadFatalError()) return; - - setupScript(rsc); - - if (rsc->props.mLogScripts) { - ALOGV("%p ScriptC::runReduce invoking slot %i, ptr %p", rsc, slot, this); - } - - rsc->mHal.funcs.script.invokeReduce(rsc, this, slot, ain, aout, sc); -} - -void ScriptC::runReduceNew(Context *rsc, uint32_t slot, - const Allocation ** ains, size_t inLen, - Allocation *aout, const RsScriptCall *sc) { // TODO: Record the name of the kernel in the tracing information. ATRACE_CALL(); - if (slot >= mHal.info.exportedReduceNewCount) { + if (slot >= mHal.info.exportedReduceCount) { rsc->setError(RS_ERROR_BAD_SCRIPT, "The general reduce kernel index is out of bounds"); return; } @@ -259,10 +239,10 @@ void ScriptC::runReduceNew(Context *rsc, uint32_t slot, setupScript(rsc); if (rsc->props.mLogScripts) { - ALOGV("%p ScriptC::runReduceNew invoking slot %i, ptr %p", rsc, slot, this); + ALOGV("%p ScriptC::runReduce invoking slot %i, ptr %p", rsc, slot, this); } - rsc->mHal.funcs.script.invokeReduceNew(rsc, this, slot, ains, inLen, aout, sc); + rsc->mHal.funcs.script.invokeReduce(rsc, this, slot, ains, inLen, aout, sc); } void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, size_t len) { |