diff options
author | Michael Bien <[email protected]> | 2010-02-24 16:00:35 +0100 |
---|---|---|
committer | Michael Bien <[email protected]> | 2010-02-24 16:00:35 +0100 |
commit | 0b0a4735f71f1e34adf426a1c033b94aca01ab75 (patch) | |
tree | 22d430272f1554f87a8bc7ca91d26e92c2aa5cde /src/com | |
parent | 01775d5597d6d1ef4fff195f572c1a6528438f66 (diff) |
code review, spell checks and scope.
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/mbien/opencl/CLBuffer.java | 2 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLCommandQueue.java | 2 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLContext.java | 2 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLDevice.java | 12 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLGLContext.java | 2 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLKernel.java | 4 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLMemory.java | 2 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLPlatform.java | 2 | ||||
-rw-r--r-- | src/com/mbien/opencl/CLUtils.java | 12 |
9 files changed, 20 insertions, 20 deletions
diff --git a/src/com/mbien/opencl/CLBuffer.java b/src/com/mbien/opencl/CLBuffer.java index ebde221c..1895018d 100644 --- a/src/com/mbien/opencl/CLBuffer.java +++ b/src/com/mbien/opencl/CLBuffer.java @@ -10,7 +10,7 @@ import static com.mbien.opencl.CLException.*; */ public class CLBuffer<B extends Buffer> extends CLMemory<B> { - public CLBuffer(CLContext context, long id) { + protected CLBuffer(CLContext context, long id) { super(context, id); } diff --git a/src/com/mbien/opencl/CLCommandQueue.java b/src/com/mbien/opencl/CLCommandQueue.java index 269b0e6e..7351d22a 100644 --- a/src/com/mbien/opencl/CLCommandQueue.java +++ b/src/com/mbien/opencl/CLCommandQueue.java @@ -807,7 +807,7 @@ public class CLCommandQueue extends CLObject implements CLResource { /** * Setting properties after a command queue has been created can be implementation specific, - * please refere to the specification ({@native clSetCommandQueueProperty}) or vendor documentation. + * please refer to the specification ({@native clSetCommandQueueProperty}) or vendor documentation. */ public void setProperty(Mode property, boolean enabled) { int ret = cl.clSetCommandQueueProperty(ID, property.QUEUE_MODE, clBoolean(enabled), null); diff --git a/src/com/mbien/opencl/CLContext.java b/src/com/mbien/opencl/CLContext.java index 68c391f1..73146acd 100644 --- a/src/com/mbien/opencl/CLContext.java +++ b/src/com/mbien/opencl/CLContext.java @@ -203,7 +203,7 @@ public class CLContext extends CLObject implements CLResource { BufferedReader reader = new BufferedReader(new InputStreamReader(sources)); StringBuilder sb = new StringBuilder(); - String line = null; + String line; try { while ((line = reader.readLine()) != null) sb.append(line).append("\n"); diff --git a/src/com/mbien/opencl/CLDevice.java b/src/com/mbien/opencl/CLDevice.java index 3c1c4e25..a4a4b380 100644 --- a/src/com/mbien/opencl/CLDevice.java +++ b/src/com/mbien/opencl/CLDevice.java @@ -130,7 +130,7 @@ public final class CLDevice extends CLObject { * 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() { + public int getPreferredShortVectorWidth() { return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT); } @@ -138,7 +138,7 @@ public final class CLDevice extends CLObject { * 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() { + public int getPreferredCharVectorWidth() { return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR); } @@ -146,7 +146,7 @@ public final class CLDevice extends CLObject { * 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() { + public int getPreferredIntVectorWidth() { return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT); } @@ -154,7 +154,7 @@ public final class CLDevice extends CLObject { * 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() { + public int getPreferredLongVectorWidth() { return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG); } @@ -162,7 +162,7 @@ public final class CLDevice extends CLObject { * 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() { + public int getPreferredFloatVectorWidth() { return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT); } @@ -170,7 +170,7 @@ public final class CLDevice extends CLObject { * 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() { + public int getPreferredDoubleVectorWidth() { return (int)deviceInfo.getLong(CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE); } diff --git a/src/com/mbien/opencl/CLGLContext.java b/src/com/mbien/opencl/CLGLContext.java index e10ae6e7..49fa7fac 100644 --- a/src/com/mbien/opencl/CLGLContext.java +++ b/src/com/mbien/opencl/CLGLContext.java @@ -108,7 +108,7 @@ public final class CLGLContext extends CLContext { DefaultGraphicsConfiguration config = (DefaultGraphicsConfiguration)ctxImpl.getDrawableImpl() .getNativeWindow().getGraphicsConfiguration().getNativeGraphicsConfiguration(); - PointerBuffer properties = null; + PointerBuffer properties; if(glContext instanceof X11GLXContext) { properties = PointerBuffer.allocateDirect(7); long handle = config.getScreen().getDevice().getHandle(); diff --git a/src/com/mbien/opencl/CLKernel.java b/src/com/mbien/opencl/CLKernel.java index 1ba84d1c..865c7bf5 100644 --- a/src/com/mbien/opencl/CLKernel.java +++ b/src/com/mbien/opencl/CLKernel.java @@ -144,7 +144,7 @@ public class CLKernel extends CLObject implements CLResource, Cloneable { } if(!program.isExecutable()) { throw new IllegalStateException("can not set program" + - " arguments for a not excecutable program. "+program); + " arguments for a not executable program. "+program); } int ret = cl.clSetKernelArg(ID, argumentIndex, size, value); @@ -153,7 +153,7 @@ public class CLKernel extends CLObject implements CLResource, Cloneable { /** * Forces double and long arguments to be passed as float and int to the OpenCL kernel. - * This can be used in applications which want to mix kernels with different floating point precison. + * This can be used in applications which want to mix kernels with different floating point precision. */ public CLKernel setForce32BitArgs(boolean force) { this.force32BitArgs = force; diff --git a/src/com/mbien/opencl/CLMemory.java b/src/com/mbien/opencl/CLMemory.java index 28de48ed..aa65e806 100644 --- a/src/com/mbien/opencl/CLMemory.java +++ b/src/com/mbien/opencl/CLMemory.java @@ -91,7 +91,7 @@ public abstract class CLMemory <B extends Buffer> extends CLObject implements CL public long getCLSize() { PointerBuffer pb = PointerBuffer.allocateDirect(1); int ret = cl.clGetMemObjectInfo(ID, CL_MEM_SIZE, PointerBuffer.elementSize(), pb.getBuffer(), null); - checkForError(ret, "can not optain buffer info"); + checkForError(ret, "can not obtain buffer info"); return pb.get(); } diff --git a/src/com/mbien/opencl/CLPlatform.java b/src/com/mbien/opencl/CLPlatform.java index ddca7d38..597878b3 100644 --- a/src/com/mbien/opencl/CLPlatform.java +++ b/src/com/mbien/opencl/CLPlatform.java @@ -35,7 +35,7 @@ public final class CLPlatform { cl = new CLImpl(); } - CLPlatform(long id) { + private CLPlatform(long id) { this.ID = id; } diff --git a/src/com/mbien/opencl/CLUtils.java b/src/com/mbien/opencl/CLUtils.java index 0f948175..8f89980e 100644 --- a/src/com/mbien/opencl/CLUtils.java +++ b/src/com/mbien/opencl/CLUtils.java @@ -100,12 +100,12 @@ class CLUtils { map.put("CL_DEVICE_DOUBLE_FP_CONFIG", dev.getDoubleFPConfig()+""); map.put("CL_DEVICE_EXTENSIONS", dev.getExtensions()+""); - map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT", dev.getPreferedShortVectorWidth()+""); - map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR", dev.getPreferedCharVectorWidth()+""); - map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT", dev.getPreferedIntVectorWidth()+""); - map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG", dev.getPreferedLongVectorWidth()+""); - map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT", dev.getPreferedFloatVectorWidth()+""); - map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE", dev.getPreferedDoubleVectorWidth()+""); + map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT", dev.getPreferredShortVectorWidth()+""); + map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR", dev.getPreferredCharVectorWidth()+""); + map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT", dev.getPreferredIntVectorWidth()+""); + map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG", dev.getPreferredLongVectorWidth()+""); + map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT", dev.getPreferredFloatVectorWidth()+""); + map.put("CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE", dev.getPreferredDoubleVectorWidth()+""); //TODO device extensions -> properties |