Class BenchmarkUtils

java.lang.Object
cz.fidentis.analyst.gui.app.tools.opencl.BenchmarkUtils

public class BenchmarkUtils extends Object
Convenience methods for loading MeshModel files
  • Constructor Details

    • BenchmarkUtils

      public BenchmarkUtils()
  • Method Details

    • getModel

      public static MeshModel getModel(String path)
      Parameters:
      path -
      Returns:
    • getModels

      public static List<MeshModel> getModels(String dir)
      Parameters:
      dir -
      Returns:
    • printGPU

      public static void printGPU()
      Prints name of OpenCL device
    • printComparison

      public static void printComparison(long timeCPU, long timeGPU, int iterations)
      Prints benchmark results to stdout
      Parameters:
      timeCPU -
      timeGPU -
      iterations -
    • saveAsCsv

      public static void saveAsCsv(ArrayList<ArrayList<Long>> data, String[] headers, String path) throws IOException
      Stores each list in data as a column in csv.
      Parameters:
      data - ArrayList of multiple ArrayLists to write as columns to csv. Must have same sizes.
      headers - What headers should columns have.
      path - Path to file to write in.
      Throws:
      IOException - If FileWriter couldn't open the file.
    • createRandomFacet

      public static MeshFacet createRandomFacet(int numPoints, float lowerBound, float upperBound)
      Creates facet with a specified number of vertexes in a given range. Adapted from SpatialDataProvider
      Parameters:
      numPoints - Number of vertexes of the MeshFacet, must be divisible by 3.
      lowerBound - Lowest x/y/z value of a randomly created vertex.
      upperBound - Highest x/y/z value of a randomly created vertex.
      Returns:
      MeshFacet