diff options
author | Tim Murray <timmurray@google.com> | 2015-04-15 23:04:41 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-04-15 23:04:41 +0000 |
commit | 3d9c9093d1d76d4aeb5f99b1746b65788c72736e (patch) | |
tree | cef0171e051249bdca59e72ef4d0b1cdd6877760 /rs/jni/android_renderscript_RenderScript.cpp | |
parent | 763100e6442494a85cfcb7949c8021836071b1f6 (diff) | |
parent | 91d2f27bc7dad2232d3f59c71f1402b86cb9f514 (diff) |
am 91d2f27b: am 7f72f747: Merge "Add BNNM intrinsic."
* commit '91d2f27bc7dad2232d3f59c71f1402b86cb9f514':
Add BNNM intrinsic.
Diffstat (limited to 'rs/jni/android_renderscript_RenderScript.cpp')
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index ba194ee224b0..6f6729bbaae0 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -584,6 +584,32 @@ nScriptIntrinsicBLAS_Z(JNIEnv *_env, jobject _this, jlong con, jlong id, jint fu static void +nScriptIntrinsicBLAS_BNNM(JNIEnv *_env, jobject _this, jlong con, jlong id, jint M, jint N, jint K, + jlong A, jint a_offset, jlong B, jint b_offset, jlong C, jint c_offset, + jint c_mult_int) { + RsBlasCall call; + memset(&call, 0, sizeof(call)); + call.func = RsBlas_bnnm; + call.M = M; + call.N = N; + call.K = K; + call.a_offset = a_offset; + call.b_offset = b_offset; + call.c_offset = c_offset; + call.c_mult_int = c_mult_int; + + RsAllocation in_allocs[3]; + in_allocs[0] = (RsAllocation)A; + in_allocs[1] = (RsAllocation)B; + in_allocs[2] = (RsAllocation)C; + + rsScriptForEachMulti((RsContext)con, (RsScript)id, 0, + in_allocs, sizeof(in_allocs), nullptr, + &call, sizeof(call), nullptr, 0); +} + + +static void nAssignName(JNIEnv *_env, jobject _this, jlong con, jlong obj, jbyteArray str) { if (kLogApi) { @@ -2427,6 +2453,8 @@ static JNINativeMethod methods[] = { {"rsnScriptIntrinsicBLAS_Complex", "(JJIIIIIIIIIFFJJFFJIIII)V", (void*)nScriptIntrinsicBLAS_Complex }, {"rsnScriptIntrinsicBLAS_Z", "(JJIIIIIIIIIDDJJDDJIIII)V", (void*)nScriptIntrinsicBLAS_Z }, +{"rsnScriptIntrinsicBLAS_BNNM", "(JJIIIJIJIJII)V", (void*)nScriptIntrinsicBLAS_BNNM }, + {"rsnProgramStoreCreate", "(JZZZZZZIII)J", (void*)nProgramStoreCreate }, {"rsnProgramBindConstants", "(JJIJ)V", (void*)nProgramBindConstants }, |