diff options
author | Michael Bien <[email protected]> | 2010-01-23 23:47:04 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-01-23 23:47:04 +0100 |
commit | 8e2cfb1179a97f7ed1248132429e1e60663b0d42 (patch) | |
tree | 187efdefe92ef9fdecdf1a188850621f67d932f9 /src/com/mbien/opencl/CLDevice.java | |
parent | e8179f3c0512ac95bfec3c64302eb8e114486ecd (diff) |
added obtain[Device|Platform]Properties() methods to CLUtils.
added preferred vector width utility accessors to CLDevice.
put impl package on javadoc ignore list.
Diffstat (limited to 'src/com/mbien/opencl/CLDevice.java')
-rw-r--r-- | src/com/mbien/opencl/CLDevice.java | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/com/mbien/opencl/CLDevice.java b/src/com/mbien/opencl/CLDevice.java index c948024b..e754a4bc 100644 --- a/src/com/mbien/opencl/CLDevice.java +++ b/src/com/mbien/opencl/CLDevice.java @@ -133,6 +133,54 @@ public final class CLDevice { } /** + * Preferred native vector width size for built-in short vectors. + * The vector width is defined as the number of scalar elements that can be stored in the vector. + */ + public int getPreferedShortVectorWidth() { + return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT); + } + + /** + * Preferred native vector width size for built-in char vectors. + * The vector width is defined as the number of scalar elements that can be stored in the vector. + */ + public int getPreferedCharVectorWidth() { + return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR); + } + + /** + * Preferred native vector width size for built-in int vectors. + * The vector width is defined as the number of scalar elements that can be stored in the vector. + */ + public int getPreferedIntVectorWidth() { + return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT); + } + + /** + * Preferred native vector width size for built-in long vectors. + * The vector width is defined as the number of scalar elements that can be stored in the vector. + */ + public int getPreferedLongVectorWidth() { + return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG); + } + + /** + * Preferred native vector width size for built-in float vectors. + * The vector width is defined as the number of scalar elements that can be stored in the vector. + */ + public int getPreferedFloatVectorWidth() { + return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT); + } + + /** + * Preferred native vector width size for built-in double vectors. + * The vector width is defined as the number of scalar elements that can be stored in the vector. + */ + public int getPreferedDoubleVectorWidth() { + return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE); + } + + /** * Returns the number of parallel compute cores on the OpenCL device. * The minimum value is 1. */ @@ -227,6 +275,14 @@ public final class CLDevice { } /** + * Returns the max number of arguments declared with the <code>constant</code> + * qualifier in a kernel. The minimum value is 8. + */ + public long getMaxConstantArgs() { + return deviceInfo.getLong(CL_DEVICE_MAX_CONSTANT_ARGS); + } + + /** * Returns true if images are supported by the OpenCL device and false otherwise. */ public boolean isImageSupportAvailable() { |