Package gov.nih.mipav.model.algorithms
Class OpenCLInfo
- java.lang.Object
-
- gov.nih.mipav.model.algorithms.OpenCLInfo
-
public class OpenCLInfo extends java.lang.Object
Queries the OpenCL Platforms and launches an information dialog with the OpenCL Platform and Device information:
-
-
Constructor Summary
Constructors Constructor Description OpenCLInfo()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static void
cell(java.lang.StringBuilder sb, int span, java.lang.String value, boolean header)
Adds the property values to the StringBuilder table, using the span for spacing.private static void
cell(java.lang.StringBuilder sb, java.lang.String value)
Adds the property name to the StringBuilder table.private static java.lang.String
createOpenCLInfoHTML()
Creates the table displayed in the information dialog.private static void
fillTable(java.util.List<java.lang.String> keys, java.util.List<java.util.Properties> properties, java.lang.StringBuilder sb)
Calculates the spans in order to fill in a StringBuilder table with a list of keys, properties.private static void
fillTable(java.util.List<java.lang.String> keys, java.util.List<java.util.Properties> properties, java.util.List<java.lang.Integer> spans, java.lang.StringBuilder sb)
Fills in a StrinBuilder table with a list of keys, properties, and spans.static void
getMaxMemSize(long inputDeviceType, long[] memSizeArray)
static void
main(java.lang.String[] args)
Queries the OpenCL Platforms and launches an information dialog with the OpenCL Platform and Device information:
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] args)
Queries the OpenCL Platforms and launches an information dialog with the OpenCL Platform and Device information:
-
createOpenCLInfoHTML
private static java.lang.String createOpenCLInfoHTML()
Creates the table displayed in the information dialog. First column is the platform property name, second (+) columns contain the values for each platform and device.- Returns:
- string version of the table.
-
fillTable
private static void fillTable(java.util.List<java.lang.String> keys, java.util.List<java.util.Properties> properties, java.lang.StringBuilder sb)
Calculates the spans in order to fill in a StringBuilder table with a list of keys, properties.- Parameters:
keys
- property namesproperties
- property valuessb
- table
-
fillTable
private static void fillTable(java.util.List<java.lang.String> keys, java.util.List<java.util.Properties> properties, java.util.List<java.lang.Integer> spans, java.lang.StringBuilder sb)
Fills in a StrinBuilder table with a list of keys, properties, and spans.- Parameters:
keys
- property namesproperties
- property valuesspans
- spans for spacing the table cellssb
- table
-
cell
private static void cell(java.lang.StringBuilder sb, java.lang.String value)
Adds the property name to the StringBuilder table.- Parameters:
sb
- tablevalue
- property name
-
cell
private static void cell(java.lang.StringBuilder sb, int span, java.lang.String value, boolean header)
Adds the property values to the StringBuilder table, using the span for spacing.- Parameters:
sb
- tablespan
- amount of spacingvalue
- property valueheader
- when true the cell is a header, so use a bold.
-
getMaxMemSize
public static void getMaxMemSize(long inputDeviceType, long[] memSizeArray)
-
-