CuVSResources

View as Markdown

Java package: com.nvidia.cuvs

1public interface CuVSResources extends AutoCloseable

Used for allocating resources for cuVS

Public Members

handle

1long handle()

Gets the opaque CuVSResources handle, to be used whenever we need to pass a cuvsResources_t parameter

Returns

the CuVSResources handle

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:25

access

1ScopedAccess access()

Gets scoped access to the native resources object. The native resource object is not thread safe: only a single thread at every time should access concurrently the same native resources. Calling this method from multiple thread is OK, but the returned ScopedAccess object must be closed before calling access() again from a different thread.

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:38

deviceId

1int deviceId()

Get the logical id of the device associated with this resources object. Information about the device id is immutable, so it is safe to expose it without getting ScopedAccess to the enclosing resources.

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:45

close

1@Override void close()

Closes this CuVSResources object and releases any resources associated with it.

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:50

tempDirectory

1Path tempDirectory()

The temporary directory to use for intermediate operations. Defaults to {@systemProperty java.io.tmpdir}.

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:57

create

1static CuVSResources create() throws Throwable

Creates a new resources. Equivalent to {@code create(CuVSProvider.tempDirectory()) }

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:66

create

1static CuVSResources create(Path tempDirectory) throws Throwable

Creates a new resources.

Parameters

NameDescription
tempDirectorythe temporary directory to use for intermediate operations

Throws

TypeDescription
UnsupportedOperationExceptionif the provider does not cuvs
LibraryExceptionif the native library cannot be loaded

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:77

Source: java/cuvs-java/src/main/java/com/nvidia/cuvs/CuVSResources.java:15