Package org.trifort.rootbeer.runtime

Examples of org.trifort.rootbeer.runtime.ThreadConfig


    return new GpuParametersRunOnGpu(120);
  }

  @Override
  public ThreadConfig getThreadConfig() {
    return new ThreadConfig(8, 1, 1, 16, 1, 120);
  }
View Full Code Here


    return new GpuVectorMapRunOnGpu2(vectorMap);
  }

  @Override
  public ThreadConfig getThreadConfig() {
    return new ThreadConfig(blockSize, 1, 1, gridSize, 1, blockSize * gridSize);
  }
View Full Code Here

    return 8 * 8 * 8 * 8 * 8;
  }

  @Override
  public ThreadConfig getThreadConfig() {
    return new ThreadConfig(8, 8, 8, 8, 8, getThreadCount());
  }
View Full Code Here

    return new DoubleToStringKernelTemplateBuilderRunOnGpu(0.125, m_blockSize * m_gridSize);
  }
 
  @Override
  public ThreadConfig getThreadConfig() {
    return new ThreadConfig(m_blockSize, 1, 1, m_gridSize, 1, m_blockSize * m_gridSize);
  }
View Full Code Here

    return new SharedMemoryArraysRunOnGpu(inputArray, outputArray, subArraySize);
  }

  @Override
  public ThreadConfig getThreadConfig() {
    return new ThreadConfig(threadSize, 1, 1, blockSize, 1, threadSize * blockSize);
  }
View Full Code Here

    Kernel ret = new EmptyKernel();
    return ret;
  }

  public ThreadConfig getThreadConfig() {
    ThreadConfig ret = new ThreadConfig(m_blockSize, 1, 1, m_gridSize, 1, m_blockSize * m_gridSize);
    return ret;
  }
View Full Code Here

    Kernel ret = new MatrixKernel(a, b, c, m_blockSize, m_gridSize);
    return ret;
  }

  public ThreadConfig getThreadConfig() {
    ThreadConfig ret = new ThreadConfig(m_blockSize, 1, 1, m_gridSize, 1, m_blockSize * m_gridSize);
    return ret;
  }
View Full Code Here

    try {     
      Rootbeer rootbeer = new Rootbeer();
      Configuration.setPrintMem(print_mem);
      Kernel known_good_item = creator.create();
      Kernel testing_item = creator.create();
      ThreadConfig thread_config = creator.getThreadConfig();

      Stopwatch watch = new Stopwatch();
      watch.start();
      Context context = rootbeer.createDefaultContext();
      context.setKernel(testing_item);
      context.setThreadConfig(thread_config);
      context.buildState();
      context.run();
      context.close();
      m_passed = true;
      watch.stop();
      m_gpuTime = watch.elapsedTimeMillis();
      watch.start();
      RootbeerGpu.setBlockDimx(thread_config.getThreadCountX());
      RootbeerGpu.setBlockDimy(thread_config.getThreadCountY());
      RootbeerGpu.setBlockDimz(thread_config.getThreadCountZ());
      RootbeerGpu.setGridDimx(thread_config.getBlockCountX());
      RootbeerGpu.setGridDimy(thread_config.getBlockCountY());
     
      for(int blockx = 0; blockx < thread_config.getBlockCountX(); ++blockx){
        RootbeerGpu.setBlockIdxx(blockx);
        for(int blocky = 0; blocky < thread_config.getBlockCountY(); ++blocky){
          RootbeerGpu.setBlockIdxy(blocky);
          for(int threadx = 0; threadx < thread_config.getThreadCountX(); ++threadx){
            RootbeerGpu.setThreadIdxx(threadx);
            for(int thready = 0; thready < thread_config.getThreadCountY(); ++thready){
              RootbeerGpu.setThreadIdxy(thready);
              for(int threadz = 0; threadz < thread_config.getThreadCountZ(); ++threadz){
                RootbeerGpu.setThreadIdxz(threadz);
                known_good_item.gpuMethod();
              }
            }
          }
View Full Code Here

    return new DoubleToStringKernelTemplateRunOnGpu(0.125, m_blockSize * m_gridSize);
  }
 
  @Override
  public ThreadConfig getThreadConfig() {
    return new ThreadConfig(m_blockSize, 1, 1, m_gridSize, 1, m_blockSize * m_gridSize);
  }
View Full Code Here

  private void gpuRun(){
    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();
View Full Code Here

TOP

Related Classes of org.trifort.rootbeer.runtime.ThreadConfig

Copyright © 2018 www.massapicom. 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.