Update: Support for OpenCLDevice configurator/configure API - codacy fix
@@ -142,13 +142,12 @@ public class OpenCLDevice extends Device implements Comparable<Device> {
* detection.
*/
public void configure() {
- if (configurator != null && !underConfiguration.get()) {
- if (underConfiguration.compareAndSet(false, true)) {
+ if (configurator != null && !underConfiguration.get() &&
+ underConfiguration.compareAndSet(false, true)) {
configurator.configure(this);
underConfiguration.set(false);
}
}
- }
@Override
public long getDeviceId() {
