UT_kernelpublic class UT_kernel extends UnitTest
Fields Summary |
---|
private android.content.res.Resources | mRes | private Allocation | A | private Allocation | B |
Methods Summary |
---|
private void | initializeGlobals(RenderScript RS, ScriptC_kernel s)
Type.Builder typeBuilder = new Type.Builder(RS, Element.I32(RS));
int X = 5;
s.set_dimX(X);
typeBuilder.setX(X);
A = Allocation.createTyped(RS, typeBuilder.create());
s.bind_ain(A);
B = Allocation.createTyped(RS, typeBuilder.create());
s.bind_aout(B);
return;
| public void | run()
RenderScript pRS = RenderScript.create(mCtx);
ScriptC_kernel s = new ScriptC_kernel(pRS);
pRS.setMessageHandler(mRsMessage);
initializeGlobals(pRS, s);
s.forEach_init_vars(A);
s.forEach_root(A, B);
s.invoke_verify_root();
s.invoke_kernel_test();
pRS.finish();
waitForMessage();
pRS.destroy();
|
|