diff options
author | Michael Bien <[email protected]> | 2009-10-12 19:05:13 +0200 |
---|---|---|
committer | Michael Bien <[email protected]> | 2009-10-12 19:05:13 +0200 |
commit | 223e32b5ce6943abf7c1ac31f1b90d3679de5571 (patch) | |
tree | 435b04350e9be30a19077b94dce660000b975d74 /src/com/mbien/opencl/CLDevice.java | |
parent | 2b05a67d30bde1419c2b0f1b5b427d65b8415eb7 (diff) |
cleaned up test output, removed some internal hardcoded fields from CLDevice.
Diffstat (limited to 'src/com/mbien/opencl/CLDevice.java')
-rw-r--r-- | src/com/mbien/opencl/CLDevice.java | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/com/mbien/opencl/CLDevice.java b/src/com/mbien/opencl/CLDevice.java index 3db2511f..ba20f4b2 100644 --- a/src/com/mbien/opencl/CLDevice.java +++ b/src/com/mbien/opencl/CLDevice.java @@ -13,8 +13,6 @@ import java.util.Set; */ public final class CLDevice { - //FIXME gluegen does not generate CL_DEVICE_TYPE_* remove hardcoded values ASAP - /** * Enumeration for the type of a device. */ @@ -22,19 +20,19 @@ public final class CLDevice { /** * CL_DEVICE_TYPE_CPU */ - CPU(1 << 1), + CPU(CL.CL_DEVICE_TYPE_CPU), /** * CL_DEVICE_TYPE_GPU */ - GPU(1 << 2), + GPU(CL.CL_DEVICE_TYPE_GPU), /** * CL_DEVICE_TYPE_ACCELERATOR */ - ACCELERATOR(1 << 3), + ACCELERATOR(CL.CL_DEVICE_TYPE_ACCELERATOR), /** * CL_DEVICE_TYPE_DEFAULT */ - DEFAULT(1 << 0); + DEFAULT(CL.CL_DEVICE_TYPE_DEFAULT); /** * Value of wrapped OpenCL device type. @@ -47,13 +45,13 @@ public final class CLDevice { public static Type valueOf(int clDeviceType) { switch(clDeviceType) { - case(1 << 0): + case(CL.CL_DEVICE_TYPE_DEFAULT): return DEFAULT; - case(1 << 1): + case(CL.CL_DEVICE_TYPE_CPU): return CPU; - case(1 << 2): + case(CL.CL_DEVICE_TYPE_GPU): return GPU; - case(1 << 3): + case(CL.CL_DEVICE_TYPE_ACCELERATOR): return ACCELERATOR; } return null; |