Class BenchmarkUtils
java.lang.Object
cz.fidentis.analyst.gui.app.tools.opencl.BenchmarkUtils
Convenience methods for loading
MeshModel
files-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MeshFacet
createRandomFacet
(int numPoints, float lowerBound, float upperBound) Creates facet with a specified number of vertexes in a given range.static MeshModel
static void
printComparison
(long timeCPU, long timeGPU, int iterations) Prints benchmark results to stdoutstatic void
printGPU()
Prints name of OpenCL devicestatic void
Stores each list indata
as a column in csv.
-
Constructor Details
-
BenchmarkUtils
public BenchmarkUtils()
-
-
Method Details
-
getModel
- Parameters:
path
-- Returns:
-
getModels
- 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 indata
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
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
-