summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLDevice.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/mbien/opencl/CLDevice.java')
-rw-r--r--src/com/mbien/opencl/CLDevice.java56
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() {