Skip to content

Commit d951617

Browse files
committed
remove changes
1 parent 7b020ca commit d951617

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/main/java/io/bioimage/modelrunner/pytorch/javacpp/shm/ShmBuilder.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,18 +103,6 @@ private static void buildFromTensorFloat(Tensor tensor, String memoryName) throw
103103
+ " is too big. Max number of elements per float output tensor supported: " + Integer.MAX_VALUE / 4);
104104
SharedMemoryArray shma = SharedMemoryArray.readOrCreate(memoryName, arrayShape, new UnsignedByteType(), false, true);
105105
shma.getDataBufferNoHeader().put(tensor.asByteBuffer());
106-
shma.getDataBufferNoHeader().rewind();
107-
tensor.asByteBuffer().rewind();
108-
float sum = 0;
109-
while (tensor.asByteBuffer().hasRemaining())
110-
sum += tensor.asByteBuffer().get();
111-
float sum2 = 0;
112-
while (shma.getDataBufferNoHeader().hasRemaining())
113-
sum2 += shma.getDataBufferNoHeader().get();
114-
System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK SRC " + sum);
115-
System.out.println("KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK TAR " + sum2);
116-
shma.getDataBufferNoHeader().rewind();
117-
tensor.asByteBuffer().rewind();
118106
if (PlatformDetection.isWindows()) shma.close();
119107
}
120108

0 commit comments

Comments
 (0)