|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjcuda.jnpp.JNpp
public class JNpp
Java bindings for NPP. Note that this class only contains common constants and the Java port of the NPP Core functions.
Nested Class Summary | |
---|---|
static class |
JNpp.Core
NPP Core - Basic functions for library management, in particular library version and device property query functions. |
Field Summary | |
---|---|
static short |
NPP_MAX_16S
Maximum 16-bit signed integer |
static short |
NPP_MAX_16U
Maximum 16-bit unsigned integer |
static int |
NPP_MAX_32S
Maximum 32-bit signed integer |
static int |
NPP_MAX_32U
Maximum 32-bit unsigned integer |
static byte |
NPP_MAX_8S
Maximum 8-bit signed integer |
static byte |
NPP_MAX_8U
Maximum 8-bit unsigned integer |
static short |
NPP_MIN_16S
Minimum 16-bit signed integer |
static short |
NPP_MIN_16U
Minimum 16-bit unsigned integer |
static int |
NPP_MIN_32S
Minimum 32-bit signed integer |
static int |
NPP_MIN_32U
Minimum 32-bit unsigned integer |
static byte |
NPP_MIN_8S
Minimum 8-bit signed integer |
static byte |
NPP_MIN_8U
Minimum 8-bit unsigned integer |
static int |
NPP_VERSION_BUILD
Build number. |
static int |
NPP_VERSION_MAJOR
Major version number |
static int |
NPP_VERSION_MINOR
Minor version number |
Constructor Summary | |
---|---|
JNpp()
|
Method Summary | ||
---|---|---|
(package private) static int |
checkResult(int result)
If the given result is a NppStatus that indicates an error and exceptions have been enabled, this method will throw a CudaException with an error message that corresponds to the given result code. |
|
(package private) static
|
checkResult(T result)
If the given result is null and exceptions are
enabled, then this method will throw a CudaException with
an error message stating that a memory allocation failed. |
|
static void |
initialize()
Initializes the native library. |
|
static void |
setExceptionsEnabled(boolean enabled)
Enables or disables exceptions. |
|
static void |
setLogLevel(jcuda.LogLevel logLevel)
Set the specified log level for the JNpp library. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int NPP_VERSION_MAJOR
public static final int NPP_VERSION_MINOR
public static final int NPP_VERSION_BUILD
public static final byte NPP_MAX_8U
public static final short NPP_MAX_16U
public static final int NPP_MAX_32U
public static final byte NPP_MIN_8U
public static final short NPP_MIN_16U
public static final int NPP_MIN_32U
public static final byte NPP_MIN_8S
public static final byte NPP_MAX_8S
public static final short NPP_MIN_16S
public static final short NPP_MAX_16S
public static final int NPP_MIN_32S
public static final int NPP_MAX_32S
Constructor Detail |
---|
public JNpp()
Method Detail |
---|
public static void initialize()
public static void setExceptionsEnabled(boolean enabled)
NppStatus
from the native method.
If exceptions are enabled, a CudaException with a detailed error
message will be thrown if a method is about to return a result code
that indicates an error
enabled
- Whether exceptions are enabledstatic int checkResult(int result)
result
- The result to check
jcuda.CudaException
- If exceptions have been enabled and
the given result code indicates an errorstatic <T extends TypedPointer<?>> T checkResult(T result)
null
and exceptions are
enabled, then this method will throw a CudaException with
an error message stating that a memory allocation failed.
Otherwise, the result is simply returned.
T
- The type of the pointerresult
- The result
jcuda.CudaException
- If exceptions have been enabled and
the given result was null
public static void setLogLevel(jcuda.LogLevel logLevel)
logLevel
- The log level to use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |