summaryrefslogtreecommitdiffstats
path: root/src/com/mbien/opencl/CLPlatform.java
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-01-08 00:11:55 +0100
committerMichael Bien <[email protected]>2010-01-08 00:11:55 +0100
commit286f94a7b148856666d7c05853ba9b2ba799b638 (patch)
treef7dc2acfaeb18d11979c58f3e40f5da923955da1 /src/com/mbien/opencl/CLPlatform.java
parent14d666509596e5b954a5c20e0be9f5826a3ce733 (diff)
introduced CLSampler and CLEvent.
refactored code to use internal CLInfoAccessor utility where it makes sense. static imports.
Diffstat (limited to 'src/com/mbien/opencl/CLPlatform.java')
-rw-r--r--src/com/mbien/opencl/CLPlatform.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/com/mbien/opencl/CLPlatform.java b/src/com/mbien/opencl/CLPlatform.java
index a0c69084..6b17b01a 100644
--- a/src/com/mbien/opencl/CLPlatform.java
+++ b/src/com/mbien/opencl/CLPlatform.java
@@ -2,7 +2,10 @@ package com.mbien.opencl;
import com.mbien.opencl.impl.CLImpl;
import java.nio.ByteBuffer;
+
import static com.mbien.opencl.CLException.*;
+import static com.mbien.opencl.CL.*;
+
/**
*
* @author Michael Bien
@@ -65,11 +68,11 @@ public final class CLPlatform {
int[] intBuffer = new int[1];
//find all devices
- int ret = cl.clGetDeviceIDs(ID, CL.CL_DEVICE_TYPE_ALL, 0, null, 0, intBuffer, 0);
+ int ret = cl.clGetDeviceIDs(ID, CL_DEVICE_TYPE_ALL, 0, null, 0, intBuffer, 0);
checkForError(ret, "error while enumerating devices");
long[] deviceIDs = new long[intBuffer[0]];
- ret = cl.clGetDeviceIDs(ID, CL.CL_DEVICE_TYPE_ALL, deviceIDs.length, deviceIDs, 0, null, 0);
+ ret = cl.clGetDeviceIDs(ID, CL_DEVICE_TYPE_ALL, deviceIDs.length, deviceIDs, 0, null, 0);
checkForError(ret, "error while enumerating devices");
CLDevice[] devices = new CLDevice[deviceIDs.length];
@@ -118,28 +121,28 @@ public final class CLPlatform {
* Returns the platform name.
*/
public String getName() {
- return getInfoString(CL.CL_PLATFORM_NAME);
+ return getInfoString(CL_PLATFORM_NAME);
}
/**
* Returns the platform version.
*/
public String getVersion() {
- return getInfoString(CL.CL_PLATFORM_VERSION);
+ return getInfoString(CL_PLATFORM_VERSION);
}
/**
* Returns the platform profile.
*/
public String getProfile() {
- return getInfoString(CL.CL_PLATFORM_PROFILE);
+ return getInfoString(CL_PLATFORM_PROFILE);
}
/**
* Returns the platform vendor.
*/
public String getVendor() {
- return getInfoString(CL.CL_PLATFORM_VENDOR);
+ return getInfoString(CL_PLATFORM_VENDOR);
}
/**