Skip to content

Commit

Permalink
remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 3, 2024
1 parent 6825604 commit a2cbf03
Showing 1 changed file with 2 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ protected void runFromShmas(List<String> inputs, List<String> outputs) throws IO
void runInterprocessing(List<Tensor<T>> inputTensors, List<Tensor<R>> outputTensors) throws RunModelException {
shmaInputList = new ArrayList<SharedMemoryArray>();
shmaOutputList = new ArrayList<SharedMemoryArray>();
List<String> encIns = modifyForWinCmd(encodeInputs(inputTensors));
List<String> encOuts = modifyForWinCmd(encodeOutputs(outputTensors));
List<String> encIns = encodeInputs(inputTensors);
List<String> encOuts = encodeOutputs(outputTensors);
LinkedHashMap<String, Object> args = new LinkedHashMap<String, Object>();
args.put("inputs", encIns);
args.put("outputs", encOuts);
Expand Down Expand Up @@ -399,16 +399,6 @@ private void closeShmas() {
shmaOutputList = null;
}

private static List<String> modifyForWinCmd(List<String> ins){
if (!PlatformDetection.isWindows())
return ins;
List<String> newIns = new ArrayList<String>();
for (String ii : ins)
newIns.add("\"" + ii.replace("\"", "\\\"") + "\"");
return newIns;
}


private <T extends RealType<T> & NativeType<T>> List<String> encodeInputs(List<Tensor<T>> inputTensors) {
List<String> encodedInputTensors = new ArrayList<String>();
Gson gson = new Gson();
Expand Down

0 comments on commit a2cbf03

Please sign in to comment.