[refactor] Added braces in the if conditions and re-formated code
@@ -50,16 +50,18 @@ public class OCLPlatform extends TornadoLogger {
this.contexts = new HashSet<>();
final int deviceCount;
- if(this.getVendor().equals("Xilinx"))
+ if (this.getVendor().equals("Xilinx")) {
deviceCount = clGetDeviceCount(id, OCLDeviceType.CL_DEVICE_TYPE_ACCELERATOR.getValue());
- else
+ } else {
deviceCount = clGetDeviceCount(id, OCLDeviceType.CL_DEVICE_TYPE_ALL.getValue());
+ }
final long[] ids = new long[deviceCount];
- if(this.getVendor().equals("Xilinx"))
+ if (this.getVendor().equals("Xilinx")) {
clGetDeviceIDs(id, OCLDeviceType.CL_DEVICE_TYPE_ACCELERATOR.getValue(), ids);
- else
+ } else {
clGetDeviceIDs(id, OCLDeviceType.CL_DEVICE_TYPE_ALL.getValue(), ids);
+ }
for (int i = 0; i < ids.length; i++) {
devices.add(new OCLDevice(i, ids[i]));
}
