public static final class CudaModule.Cache
extends java.lang.Object
Cache class provides a simple mechanism to avoid reloading
modules repeatedly. The set of loaded modules is specific to each device
so two pieces of identification are required for each module: the device
and a user-supplied key.
Note: Because this class is implemented with HashMap, keys
must implement Object.equals(Object) and Object.hashCode().
| Constructor and Description |
|---|
Cache()
Creates a new cache.
|
| Modifier and Type | Method and Description |
|---|---|
CudaModule |
get(CudaDevice device,
java.lang.Object key)
Retrieves an existing module for the specified device and key.
|
CudaModule |
put(CudaDevice device,
java.lang.Object key,
CudaModule module)
Stores a module in this cache, associating it with the given
device and key.
|
public CudaModule get(CudaDevice device, java.lang.Object key)
device - the specified devicekey - the specified keypublic CudaModule put(CudaDevice device, java.lang.Object key, CudaModule module)
device - the specified devicekey - the specified keymodule - the module to be storedEclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2013, 2025 IBM Corp. and others.
DRAFT internal-b00