Skip to content

Commit

Permalink
make code quality analyser happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Gleethos committed Dec 10, 2024
1 parent d864d34 commit 5654235
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ public BiElementwise() {
setCallPreparation(this::_prepare);
}

private ExecutionCall<?> _prepare( ExecutionCall<?> call ) {
private ExecutionCall<?> _prepare( final ExecutionCall<?> inputCall ) {
ExecutionCall<?> call = inputCall;
if ( call.arity() < 3 ) call = call.withAddedInputAt(0, null);
Device<Object> device = (Device<Object>) call.getDevice();
if ( call.input( 0 ) == null ) // Creating a new tensor:
Expand Down
13 changes: 4 additions & 9 deletions src/main/java/neureka/devices/CustomDeviceCleaner.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,18 @@
final class CustomDeviceCleaner implements DeviceCleaner
{
private static final Logger log = LoggerFactory.getLogger(CustomDeviceCleaner.class);

private static final CustomDeviceCleaner _INSTANCE = new CustomDeviceCleaner();

private static final long _QUEUE_TIMEOUT = 60 * 1000;


public static CustomDeviceCleaner getInstance() {
return _INSTANCE;
}


private final ReferenceQueue<Object> _referenceQueue = new ReferenceQueue<>();

private final List<ReferenceWithCleanup<Object>> _toBeCleaned = new ArrayList<>();
private final Thread _thread;


public static CustomDeviceCleaner getInstance() {
return _INSTANCE;
}

CustomDeviceCleaner() {
_thread = new Thread(this::run, "Neureka-Cleaner");
}
Expand Down

0 comments on commit 5654235

Please sign in to comment.