Home | History | Annotate | Download | only in blasbenchmark
      1 /*
      2  * Copyright (C) 2015 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.example.android.rs.blasbenchmark;
     18 
     19 import android.app.Activity;
     20 import android.content.Context;
     21 import android.renderscript.RenderScript;
     22 import android.renderscript.Allocation;
     23 import android.widget.TextView;
     24 import android.view.View;
     25 import android.util.Log;
     26 import android.widget.Spinner;
     27 
     28 public class TestBase  {
     29     protected final String TAG = "BLAS";
     30 
     31     protected RenderScript mRS;
     32     protected Allocation mInPixelsAllocation;
     33     protected Allocation mInPixelsAllocation2;
     34     public Allocation mOutPixelsAllocation;
     35     protected BlasBenchmark act;
     36 
     37     protected TextView mText;
     38     public final void createBaseTest(BlasBenchmark ipact) {
     39         act = ipact;
     40         mRS = ipact.mProcessor.mRS;
     41         createTest();
     42     }
     43 
     44     // Overide to provide more info
     45     public String getTestInfo() {
     46         return "BLAS BenchMark";
     47     }
     48 
     49     // Must override
     50     public void createTest() {
     51     }
     52 
     53     // Must override
     54     public void runTest() {
     55     }
     56 
     57     public void destroy() {
     58     }
     59 }
     60