The CUDA4J application programming interface (Linux®, Windows only)

You can use the CUDA4J application programming interface (API) to develop applications that can specify exactly when to use the graphics processing unit (GPU) for application processing. Many classes are available to manage operations between the CPU and the GPU.

NVIDIA Compute Unified Device Architecture (CUDA) is the NVIDIA platform for parallel processing on a graphics processing unit (GPU). You can use the CUDA4J API to develop Java™ applications that can directly invoke arbitrary kernels on the GPU, providing low-level control over processing.

The CUDA4J API enables you to develop applications that can move data between the Java heap and memory buffers on the GPU. On the GPU, C kernels can be invoked to process that data and the results can be moved back into the Java heap under the control of the application.

Not all application processing functions are suitable for offloading to the GPU, even those functions that might lend themselves to parallel processing capabilities. One such function is code page conversion. Although this operation might be suitable for parallel processing, there is a substantial and unavoidable cost in moving the data between the CPU and the GPU, regardless of the size of the data that needs converting.

API classes

The CUDA4J API provides many classes for performing a range of operations on the GPU. You can query the CUDA device on the system, obtaining information about the number of devices, the runtime level, and the configuration options for that device. Classes are also available for setting up buffers that allow data transfer between Java memory and device memory. For more information about how to develop your applications code, see the CUDA4J Application programming reference.
Note: Start of changes for service refresh 5 fix pack 25On systems that do not have or do not support GPU devices, you can still use the CUDA4J API to determine that there are zero GPU devices available.End of changes for service refresh 5 fix pack 25