Skip to content

Commit

Permalink
correct small error
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 3, 2024
1 parent be23fbf commit 5e3414b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ private static void buildFromTensorFloat(TFloat32 tensor, String memoryName) thr
for (int i = 0; i < buff.capacity(); i ++) {
buff.put(tensorData.getByte(i));
}
System.out.println("TIME 1: " + (System.currentTimeMillis() - tt) / 1000);
System.out.println("TIME 1: " + (System.currentTimeMillis() - tt));
buff.rewind();
tt = System.currentTimeMillis();
byte[] flat = new byte[buff.capacity()];
ByteBuffer buff2 = ByteBuffer.wrap(flat);
tensor.asRawTensor().data().read(flat, 0, buff.capacity());
shma.setBuffer(buff2);
System.out.println("TIME 2: " + (System.currentTimeMillis() - tt) / 1000);
buff = buff2;
System.out.println("TIME 2: " + (System.currentTimeMillis() - tt));
if (PlatformDetection.isWindows()) shma.close();
}

Expand Down

0 comments on commit 5e3414b

Please sign in to comment.