Class Utils


  • public class Utils
    extends Object
    Utility class for JOCL backend
    Author:
    royer
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.jocl.cl_device_id[] convertDevicePointers​(ClearCLPeerPointer... pClearCLDevicePeerPointers)
      Converts device pointers from peer pointers to backend specific pointers,
      static boolean getBoolean​(org.jocl.cl_device_id pPointer, int pParam)
      Returns boolean property for device
      static int getInt​(org.jocl.cl_device_id device, int paramName)
      Returns the value of the device info parameter with the given name
      static int[] getInts​(org.jocl.cl_device_id device, int paramName, int numValues)
      Returns the values of the device info parameter with the given name
      static long getLong​(org.jocl.cl_device_id device, int paramName)
      Returns the value of the device info parameter with the given name
      static long[] getLongs​(org.jocl.cl_device_id device, int paramName, int numValues)
      Returns the values of the device info parameter with the given name
      static long getSize​(org.jocl.cl_device_id device, int paramName)
      Returns the value of the device info parameter with the given name
      static long[] getSizes​(org.jocl.cl_device_id device, int paramName, int numValues)
      Returns the values of the device info parameter with the given name
      static String getString​(org.jocl.cl_device_id device, int paramName)
      Returns the value of the device info parameter with the given name
      static String getString​(org.jocl.cl_platform_id platform, int paramName)
      Returns the value of the platform info parameter with the given name
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • getInt

        public static int getInt​(org.jocl.cl_device_id device,
                                 int paramName)
        Returns the value of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        Returns:
        The value
      • getInts

        public static int[] getInts​(org.jocl.cl_device_id device,
                                    int paramName,
                                    int numValues)
        Returns the values of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        numValues - The number of values
        Returns:
        The value
      • getLong

        public static long getLong​(org.jocl.cl_device_id device,
                                   int paramName)
        Returns the value of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        Returns:
        The value
      • getLongs

        public static long[] getLongs​(org.jocl.cl_device_id device,
                                      int paramName,
                                      int numValues)
        Returns the values of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        numValues - The number of values
        Returns:
        The value
      • getString

        public static String getString​(org.jocl.cl_device_id device,
                                       int paramName)
        Returns the value of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        Returns:
        The value
      • getString

        public static String getString​(org.jocl.cl_platform_id platform,
                                       int paramName)
        Returns the value of the platform info parameter with the given name
        Parameters:
        platform - The platform
        paramName - The parameter name
        Returns:
        The value
      • getSize

        public static long getSize​(org.jocl.cl_device_id device,
                                   int paramName)
        Returns the value of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        Returns:
        The value
      • getSizes

        public static long[] getSizes​(org.jocl.cl_device_id device,
                                      int paramName,
                                      int numValues)
        Returns the values of the device info parameter with the given name
        Parameters:
        device - The device
        paramName - The parameter name
        numValues - The number of values
        Returns:
        The value
      • getBoolean

        public static boolean getBoolean​(org.jocl.cl_device_id pPointer,
                                         int pParam)
        Returns boolean property for device
        Parameters:
        pPointer - device pointer
        pParam - parameter
        Returns:
        boolean
      • convertDevicePointers

        public static org.jocl.cl_device_id[] convertDevicePointers​(ClearCLPeerPointer... pClearCLDevicePeerPointers)
        Converts device pointers from peer pointers to backend specific pointers,
        Parameters:
        pClearCLDevicePeerPointers - device pointers
        Returns:
        array of backend specific device pointers