FileDocCategorySizeDatePackage
UT_kernel.javaAPI DocAndroid 5.1 API1895Thu Mar 12 22:22:54 GMT 2015com.android.rs.test_compat

UT_kernel

public class UT_kernel extends UnitTest

Fields Summary
private android.content.res.Resources
mRes
private Allocation
A
private Allocation
B
Constructors Summary
protected UT_kernel(RSTestCore rstc, android.content.res.Resources res, android.content.Context ctx)

        super(rstc, "Kernels (pass-by-value)", ctx);
        mRes = res;
    
Methods Summary
private voidinitializeGlobals(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 voidrun()

        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();