Package org.trifort.rootbeer.runtime

Examples of org.trifort.rootbeer.runtime.Rootbeer.run()


    for(int i = 0; i < size; ++i){
      jobs.add(new MMult(a, b, c, i, size));
    }

    Rootbeer rootbeer = new Rootbeer();
    rootbeer.run(jobs);
  }

  public void cpuMultMatrices(int[] a, int[] b, int[] c, int size){
    for(int x = 0; x < size; ++x){
      for(int y = 0; y < size; ++y){
View Full Code Here


      Configuration.setPrintMem(print_mem);
      List<Kernel> known_good_items = creator.create();
      List<Kernel> testing_items = creator.create();
      Stopwatch watch = new Stopwatch();
      watch.start();
      rootbeer.run(testing_items);
      m_passed = true;
      watch.stop();
      m_gpuTime = watch.elapsedTimeMillis();
      watch.start();
      for(i = 0; i < known_good_items.size(); ++i){      
View Full Code Here

  private void ex_test(TestException creator, boolean print_mem) {
    Rootbeer rootbeer = new Rootbeer();
    Configuration.setPrintMem(print_mem);
    List<Kernel> testing_items = creator.create();
    try {
      rootbeer.run(testing_items);
      m_passed = false;
      m_message = "No exception thrown when expecting one.";
    } catch(Throwable ex){
      m_passed = creator.catchException(ex);
      if(m_passed == false){
View Full Code Here

    for(int index = 0; index < array.length; ++index){
      tasks.add(new ScalarAddKernel(array, index));
    }

    Rootbeer rootbeer = new Rootbeer();
    rootbeer.run(tasks);
  }

  private void printArray(String message, int[] array){
    for(int i = 0; i < array.length; ++i){
      System.out.println(message+" array["+i+"]: "+array[i]);
View Full Code Here

    m_gpuWatch.start();
    MatrixKernel matrix_kernel = new MatrixKernel(m_a, m_bgpu, m_cgpu, m_blockSize,
      m_gridSize, m_blockIters);
    Rootbeer rootbeer = new Rootbeer();
    ThreadConfig thread_config = new ThreadConfig(1024, m_gridSize, 1024 * m_gridSize);
    rootbeer.run(matrix_kernel, thread_config);
    m_gpuWatch.stop();
    System.out.println("avg gpu time: "+m_gpuWatch.getAverageTime()+" ms");

    List<Calculation> calc_list = matrix_kernel.m_calcList.getList();
    for(Calculation calc : calc_list){
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.