Top Description Fields Constructors Methods
org.lwjgl.cuda

public final Class CUDA

extends Object
Class Inheritance
Imports
org.lwjgl.system.*, java.io.*, java.nio.file.*, java.util.*, java.util.regex.*, java.util.stream.*

CUDA utilities.

The CUDA Driver API can be used immediately, without any configuration.

LWJGL does not bundle CUDA Toolkit libraries. For the bindings of such a library to work, LWJGL must be able to find the corresponding shared libraries that export the library's API. By default, LWJGL scans the standard CUDA Toolkit installation directory and loads the shared libraries of the CUDA Toolkit with the greatest version it can detect. This process can be overridden with the Configuration#CUDA_TOOLKIT_VERSION and Configuration#CUDA_TOOLKIT_PATH options.

In the case of a custom CUDA Toolkit library distribution:

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final Pattern

Constructor Summary

AccessConstructor and Description
private
CUDA()

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
pack-priv static String
pack-priv static String
__CUDA_API_VERSION(String api, int version)

private static String
pack-priv static SharedLibrary
getToolkitLibrary(Class<?> context, Configuration<String> option, String name)

private static Path
public static boolean

Returns:

true if per-thread synchronization is supported, false if only the legacy default stream is supported
isPerThreadDefaultStreamSupported
()

Returns true if the CUDA driver supports per-thread synchronization for the default stream.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

TOOLKIT_DEFAULT_ROOTback to summary
private static final String TOOLKIT_DEFAULT_ROOT
TOOLKIT_PREFIXback to summary
private static final String TOOLKIT_PREFIX
TOOLKIT_REGEXback to summary
private static final Pattern TOOLKIT_REGEX

Constructor Detail

CUDAback to summary
private CUDA()

Method Detail

__CUDA_API_PTDSback to summary
pack-priv static String __CUDA_API_PTDS(String api)
__CUDA_API_PTSZback to summary
pack-priv static String __CUDA_API_PTSZ(String api)
__CUDA_API_VERSIONback to summary
pack-priv static String __CUDA_API_VERSION(String api, int version)
getToolkitLibraryback to summary
private static String getToolkitLibrary(String name)
getToolkitLibraryback to summary
pack-priv static SharedLibrary getToolkitLibrary(Class<?> context, Configuration<String> option, String name)
getToolkitPathback to summary
private static Path getToolkitPath()
isPerThreadDefaultStreamSupportedback to summary
public static boolean isPerThreadDefaultStreamSupported()

Returns true if the CUDA driver supports per-thread synchronization for the default stream.

CUDA defaults to the legacy default stream. If this method returns true and per-thread synchronization is desired, set Configuration#CUDA_API_PER_THREAD_DEFAULT_STREAM to true before initializing the driver.

Returns:boolean

true if per-thread synchronization is supported, false if only the legacy default stream is supported