FileDocCategorySizeDatePackage
Mandelbrot.javaAPI DocAndroid 5.1 API1495Thu Mar 12 22:22:54 GMT 2015com.example.android.rs.computeperf

Mandelbrot

public class Mandelbrot extends Object implements Runnable

Fields Summary
private RenderScript
mRS
private Allocation
mAllocationXY
private ScriptC_mandelbrot
mScript
Constructors Summary
Mandelbrot(RenderScript rs, android.content.res.Resources res)

        mRS = rs;
        mScript = new ScriptC_mandelbrot(mRS);

        Type.Builder tb = new Type.Builder(rs, Element.U8_4(rs));
        tb.setX(mScript.get_gDimX());
        tb.setY(mScript.get_gDimY());
        mAllocationXY = Allocation.createTyped(rs, tb.create());
    
Methods Summary
public voidrun()

        long t = java.lang.System.currentTimeMillis();
        mScript.forEach_root(mAllocationXY);
        mRS.finish();
        t = java.lang.System.currentTimeMillis() - t;
        android.util.Log.v("ComputePerf", "mandelbrot  ms " + t);