| Modifier and Type | Class and Description |
|---|---|
static class |
CudaModule.Cache
The
Cache class provides a simple mechanism to avoid reloading
modules repeatedly. |
| Constructor and Description |
|---|
CudaModule(CudaDevice device,
byte[] image)
Loads a module on the specified device, using the given image and the
default options.
|
CudaModule(CudaDevice device,
byte[] image,
CudaJitOptions options)
Loads a module on the specified device, using the given image and the
given options.
|
CudaModule(CudaDevice device,
InputStream input)
Loads a module on the specified device from the given input stream using
the default options.
|
CudaModule(CudaDevice device,
InputStream input,
CudaJitOptions options)
Loads a module on the specified device from the given input stream using
the specified options.
|
| Modifier and Type | Method and Description |
|---|---|
CudaFunction |
getFunction(String name)
Returns the function of the specified name from this module.
|
CudaGlobal |
getGlobal(String name)
Returns the global variable of the specified name from this module.
|
CudaSurface |
getSurface(String name)
Returns the surface of the specified name from this module.
|
CudaTexture |
getTexture(String name)
Returns the texture of the specified name from this module.
|
void |
unload()
Unloads this module from the associated device.
|
public CudaModule(CudaDevice device, byte[] image) throws CudaException
device - the specified deviceimage - the module imageCudaException - if a CUDA exception occursSecurityException - if a security manager exists and the calling thread
does not have permission to load GPU modulespublic CudaModule(CudaDevice device, byte[] image, CudaJitOptions options) throws CudaException
device - the specified deviceimage - the module imageoptions - the desired optionsCudaException - if a CUDA exception occursSecurityException - if a security manager exists and the calling thread
does not have permission to load GPU modulespublic CudaModule(CudaDevice device, InputStream input) throws CudaException, IOException
device - the specified deviceinput - a stream containing the module imageCudaException - if a CUDA exception occursIOException - if an I/O error occurs reading inputSecurityException - if a security manager exists and the calling thread
does not have permission to load GPU modulespublic CudaModule(CudaDevice device, InputStream input, CudaJitOptions options) throws CudaException, IOException
device - the specified deviceinput - a stream containing the module imageoptions - the desired optionsCudaException - if a CUDA exception occursIOException - if an I/O error occurs reading inputSecurityException - if a security manager exists and the calling thread
does not have permission to load GPU modulespublic CudaFunction getFunction(String name) throws CudaException
name - the link-name of the desired functionCudaException - if a CUDA exception occursIllegalStateException - if this module has been unloaded (see unload())public CudaGlobal getGlobal(String name) throws CudaException
name - the link-name of the desired global variableCudaException - if a CUDA exception occursIllegalStateException - if this module has been unloaded (see unload())public CudaSurface getSurface(String name) throws CudaException
name - the link-name of the desired surfaceCudaException - if a CUDA exception occursIllegalStateException - if this module has been unloaded (see unload())public CudaTexture getTexture(String name) throws CudaException
name - the link-name of the desired textureCudaException - if a CUDA exception occursIllegalStateException - if this module has been unloaded (see unload())public void unload()
throws CudaException
Note that this has no effect on any caches.
CudaException - if a CUDA exception occursEclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2013, 2025 IBM Corp. and others.