diff options
| author | Matt Wala <wala@google.com> | 2015-07-30 17:30:25 -0700 |
|---|---|---|
| committer | Matt Wala <wala@google.com> | 2015-08-14 12:24:24 -0700 |
| commit | 14ce007a633b10e3b9a3fae29d8f53a7e8c9b59f (patch) | |
| tree | d9089fc8c60a65d071cb817b156cc0edc3bb5015 /cpu_ref/rsCpuScriptGroup.cpp | |
| parent | 2b4632b580c756af046ee4b9a6ecc77a01388d4e (diff) | |
Add a basic implementation of the reduce kernel API to the CPU
reference implementation.
Bug: 22631253
For now, this just runs a serial reduction on one thread.
Change-Id: I34c96d24bb6f44274de72bb53160abcf79d143b0
Diffstat (limited to 'cpu_ref/rsCpuScriptGroup.cpp')
| -rw-r--r-- | cpu_ref/rsCpuScriptGroup.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cpu_ref/rsCpuScriptGroup.cpp b/cpu_ref/rsCpuScriptGroup.cpp index 82208db9..9cc9b69d 100644 --- a/cpu_ref/rsCpuScriptGroup.cpp +++ b/cpu_ref/rsCpuScriptGroup.cpp @@ -203,7 +203,7 @@ void CpuScriptGroupImpl::execute() { } - MTLaunchStruct mtls; + MTLaunchStructForEach mtls; if (fieldDep) { for (size_t ct=0; ct < ins.size(); ct++) { @@ -230,7 +230,7 @@ void CpuScriptGroupImpl::execute() { mtls.fep.usrLen, nullptr); if (launchOK) { - mCtx->launchThreads(ains, inLen, outs[ct], nullptr, &mtls); + mCtx->launchForEach(ains, inLen, outs[ct], nullptr, &mtls); } si->postLaunch(slot, ains, inLen, outs[ct], nullptr, 0, nullptr); @@ -280,10 +280,10 @@ void CpuScriptGroupImpl::execute() { if (si->forEachMtlsSetup(ains, inLen, outs[0], nullptr, 0, nullptr, &mtls)) { mtls.script = nullptr; - mtls.kernel = (void (*)())&scriptGroupRoot; + mtls.kernel = &scriptGroupRoot; mtls.fep.usr = &sl; - mCtx->launchThreads(ains, inLen, outs[0], nullptr, &mtls); + mCtx->launchForEach(ains, inLen, outs[0], nullptr, &mtls); } for (size_t ct=0; ct < kernels.size(); ct++) { |
