diff options
author | Sven Gothel <[email protected]> | 2014-07-03 16:35:47 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-07-03 16:35:47 +0200 |
commit | a90ee128ce0550cd05f969d0283312c2f42b8254 (patch) | |
tree | dade644101970d8f69ea3845db310499f2b66a76 /src/com/jogamp/opencl/llb/impl/CLImpl.java | |
parent | a0e0c8a39d0ef41ff6b64d9b40d058f21b786e81 (diff) |
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
- Change non static accesses to static members using declaring type
- Change indirect accesses to static members to direct accesses (accesses through subtypes)
- Add final modifier to private fields
- Add final modifier to method parameters
- Add final modifier to local variables
- Remove unnecessary casts
- Remove unnecessary '$NON-NLS$' tags
- Remove trailing white spaces on all lines
Diffstat (limited to 'src/com/jogamp/opencl/llb/impl/CLImpl.java')
-rw-r--r-- | src/com/jogamp/opencl/llb/impl/CLImpl.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/com/jogamp/opencl/llb/impl/CLImpl.java b/src/com/jogamp/opencl/llb/impl/CLImpl.java index 57d45dfc..6eb9cde5 100644 --- a/src/com/jogamp/opencl/llb/impl/CLImpl.java +++ b/src/com/jogamp/opencl/llb/impl/CLImpl.java @@ -56,7 +56,7 @@ public class CLImpl extends CLAbstractImpl { } @Override - public long clCreateContext(PointerBuffer properties, PointerBuffer devices, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { + public long clCreateContext(final PointerBuffer properties, final PointerBuffer devices, final CLErrorHandler pfn_notify, final IntBuffer errcode_ret) { if (properties != null && !properties.isDirect()) { throw new RuntimeException("Argument \"properties\" was not a direct buffer"); @@ -71,8 +71,8 @@ public class CLImpl extends CLAbstractImpl { throw new UnsupportedOperationException("Method not available"); } - long[] global = new long[1]; - long ctx = this.clCreateContext0( + final long[] global = new long[1]; + final long ctx = this.clCreateContext0( properties != null ? properties.getBuffer() : null, getDirectBufferByteOffset(properties), devices != null ? devices.remaining() : 0, devices != null ? devices.getBuffer() : null, getDirectBufferByteOffset(devices), pfn_notify, global, errcode_ret, getDirectBufferByteOffset(errcode_ret), address); @@ -88,7 +88,7 @@ public class CLImpl extends CLAbstractImpl { private native long clCreateContext0(Object cl_context_properties, int props_offset, int numDevices, Object devices, int devices_offset, Object pfn_notify, long[] global, Object errcode_ret, int err_offset, long address); @Override - public long clCreateContextFromType(PointerBuffer properties, long device_type, CLErrorHandler pfn_notify, IntBuffer errcode_ret) { + public long clCreateContextFromType(final PointerBuffer properties, final long device_type, final CLErrorHandler pfn_notify, final IntBuffer errcode_ret) { if (properties != null && !properties.isDirect()) { throw new RuntimeException("Argument \"properties\" was not a direct buffer"); } @@ -102,8 +102,8 @@ public class CLImpl extends CLAbstractImpl { throw new UnsupportedOperationException("Method not available"); } - long[] global = new long[1]; - long ctx = this.clCreateContextFromType0( + final long[] global = new long[1]; + final long ctx = this.clCreateContextFromType0( properties != null ? properties.getBuffer() : null, getDirectBufferByteOffset(properties), device_type, pfn_notify, global, errcode_ret, getDirectBufferByteOffset(errcode_ret), address); @@ -118,7 +118,7 @@ public class CLImpl extends CLAbstractImpl { private native long clCreateContextFromType0(Object properties, int props_offset, long device_type, Object pfn_notify, long[] global, Object errcode_ret, int err_offset, long address); @Override - public int clReleaseContext(long context) { + public int clReleaseContext(final long context) { long global = 0; synchronized (contextCallbackMap) { global = contextCallbackMap.remove(context); @@ -136,7 +136,7 @@ public class CLImpl extends CLAbstractImpl { /** Interface to C language function: <br> <code> int32_t clBuildProgram(cl_program, uint32_t, cl_device_id * , const char * , void * ); </code> */ @Override - public int clBuildProgram(long program, int deviceCount, PointerBuffer deviceList, String options, BuildProgramCallback cb) { + public int clBuildProgram(final long program, final int deviceCount, final PointerBuffer deviceList, final String options, final BuildProgramCallback cb) { if (deviceList != null && !deviceList.isDirect()) { throw new RuntimeException("Argument \"properties\" was not a direct buffer"); } @@ -154,7 +154,7 @@ public class CLImpl extends CLAbstractImpl { @Override - public int clSetEventCallback(long event, int trigger, CLEventCallback callback) { + public int clSetEventCallback(final long event, final int trigger, final CLEventCallback callback) { final long address = addressTable._addressof_clSetEventCallback; if (address == 0) { throw new UnsupportedOperationException("Method not available"); @@ -166,7 +166,7 @@ public class CLImpl extends CLAbstractImpl { @Override - public int clSetMemObjectDestructorCallback(long memObjID, CLMemObjectDestructorCallback cb) { + public int clSetMemObjectDestructorCallback(final long memObjID, final CLMemObjectDestructorCallback cb) { final long address = addressTable._addressof_clSetMemObjectDestructorCallback; if (address == 0) { throw new UnsupportedOperationException("Method not available"); @@ -186,11 +186,11 @@ public class CLImpl extends CLAbstractImpl { @param event a direct {@link com.jogamp.common.nio.PointerBuffer} @param errcode_ret a direct {@link java.nio.IntBuffer} */ @Override - public ByteBuffer clEnqueueMapImage(long command_queue, long image, int blocking_map, long map_flags, - PointerBuffer origin, PointerBuffer range, - PointerBuffer image_row_pitch, PointerBuffer image_slice_pitch, - int num_events_in_wait_list, - PointerBuffer event_wait_list, PointerBuffer event, IntBuffer errcode_ret) { + public ByteBuffer clEnqueueMapImage(final long command_queue, final long image, final int blocking_map, final long map_flags, + final PointerBuffer origin, final PointerBuffer range, + final PointerBuffer image_row_pitch, final PointerBuffer image_slice_pitch, + final int num_events_in_wait_list, + final PointerBuffer event_wait_list, final PointerBuffer event, final IntBuffer errcode_ret) { if (origin != null && !origin.isDirect()) { throw new CLException("Argument \"origin\" was not a direct buffer"); |