java.lang.Object
com.ibm.gpu.Maths
This class is used to perform sorting operations of
 primitive arrays of type int, long, float, double
 on any connected CUDA GPU. A successful sort operation
 results in the array being sorted in ascending order.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidsortArray(double[] array) Sort the given array of doubles into ascending order, using the default CUDA device.static voidsortArray(double[] array, int fromIndex, int toIndex) Sort the specified range of the array of doubles into ascending order, using the default CUDA device.static voidsortArray(float[] array) Sort the given array of floats into ascending order, using the default CUDA device.static voidsortArray(float[] array, int fromIndex, int toIndex) Sort the specified range of the array of floats into ascending order, using the default CUDA device.static voidsortArray(int[] array) Sort the given array of integers into ascending order, using the default CUDA device.static voidsortArray(int[] array, int fromIndex, int toIndex) Sort the specified range of the array of integers into ascending order, using the default CUDA device.static voidsortArray(int deviceId, double[] array) Sort the given array of doubles into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, double[] array, int fromIndex, int toIndex) Sort the specified range of the array of doubles into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, float[] array) Sort the given array of floats into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, float[] array, int fromIndex, int toIndex) Sort the specified range of the array of floats into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, int[] array) Sort the given array of integers into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, int[] array, int fromIndex, int toIndex) Sort the specified range of the array of integers into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, long[] array) Sort the given array of longs into ascending order, using the specified CUDA device.static voidsortArray(int deviceId, long[] array, int fromIndex, int toIndex) Sort the specified range of the array of longs into ascending order, using the specified CUDA device.static voidsortArray(long[] array) Sort the given array of longs into ascending order, using the default CUDA device.static voidsortArray(long[] array, int fromIndex, int toIndex) Sort the specified range of the array of longs into ascending order, using the default CUDA device.
- 
Method Details- 
sortArraySort the given array of doubles into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(double[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of doubles into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraySort the given array of floats into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(float[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of floats into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, double[] array) throws GPUConfigurationException, GPUSortException Sort the given array of doubles into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, double[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of doubles into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, float[] array) throws GPUConfigurationException, GPUSortException Sort the given array of floats into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, float[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of floats into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, int[] array) throws GPUConfigurationException, GPUSortException Sort the given array of integers into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, int[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of integers into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, long[] array) throws GPUConfigurationException, GPUSortException Sort the given array of longs into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int deviceId, long[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of longs into ascending order, using the specified CUDA device.- Parameters:
- deviceId- the CUDA device to be used
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraySort the given array of integers into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(int[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of integers into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraySort the given array of longs into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
- 
sortArraypublic static void sortArray(long[] array, int fromIndex, int toIndex) throws GPUConfigurationException, GPUSortException Sort the specified range of the array of longs into ascending order, using the default CUDA device.- Parameters:
- array- the array that will be sorted
- fromIndex- the range starting index (inclusive)
- toIndex- the range ending index (exclusive)
- Throws:
- GPUConfigurationException- if an issue has occurred with the CUDA environment
- GPUSortException- if any of the following happens:- the device is not available
- insufficient device memory is available
- an error occurs transferring the data to or from the device
- a device execution error occurs
 
 
 
-