Code formator (#236)

* Re-import code formator
This commit is contained in:
Laurent Clouet
2020-05-28 13:28:42 +02:00
committed by GitHub
parent 1dc865a979
commit 44cf85739c
67 changed files with 697 additions and 955 deletions

View File

@@ -2,7 +2,7 @@
* Copyright (C) 2010-2014 Laurent CLOUET
* Author Laurent CLOUET <laurent.clouet@nopnop.net>
*
* This program is free software; you can redistribute it and/or
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 2
* of the License.
@@ -37,13 +37,11 @@ public class Windows extends OS {
return "windows";
}
@Override
public String getRenderBinaryPath() {
@Override public String getRenderBinaryPath() {
return "rend.exe";
}
@Override
public CPU getCPU() {
@Override public CPU getCPU() {
CPU ret = new CPU();
try {
String[] identifier = java.lang.System.getenv("PROCESSOR_IDENTIFIER").split(" ");
@@ -88,8 +86,7 @@ public class Windows extends OS {
return ret;
}
@Override
public long getMemory() {
@Override public long getMemory() {
try {
MEMORYSTATUSEX _memory = new MEMORYSTATUSEX();
if (Kernel32.INSTANCE.GlobalMemoryStatusEx(_memory)) {
@@ -102,8 +99,7 @@ public class Windows extends OS {
return 0;
}
@Override
public long getFreeMemory() {
@Override public long getFreeMemory() {
try {
MEMORYSTATUSEX _memory = new MEMORYSTATUSEX();
if (Kernel32.INSTANCE.GlobalMemoryStatusEx(_memory)) {
@@ -112,18 +108,16 @@ public class Windows extends OS {
}
catch (Exception e) {
e.printStackTrace();
}
}
return -1;
}
@Override
public String getCUDALib() {
@Override public String getCUDALib() {
return "nvcuda";
}
@Override
public Process exec(List<String> command, Map<String, String> env) throws IOException {
@Override public Process exec(List<String> command, Map<String, String> env) throws IOException {
// disable a popup because the renderer might crash (seg fault)
Kernel32Lib kernel32lib = null;
try {
@@ -216,8 +210,7 @@ public class Windows extends OS {
return process_class;
}
@Override
public boolean kill(Process process) {
@Override public boolean kill(Process process) {
if (process != null) {
WinProcess wproc = new WinProcess(process);
wproc.kill();