Skip to content

Commit

Permalink
tiro en los wevos
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Nov 24, 2024
1 parent 76c8143 commit 2a12088
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.DoubleBuffer;
import java.nio.FloatBuffer;
import java.nio.IntBuffer;
Expand Down Expand Up @@ -134,7 +135,7 @@ private static void buildFromTensorFloat(Tensor tensor, String memoryName) throw
long flatSize = 1;
for (long l : arrayShape) {flatSize *= l;}
float[] flat = new float[(int) flatSize];
ByteBuffer byteBuffer = ByteBuffer.allocateDirect((int) (flatSize * Float.BYTES));
ByteBuffer byteBuffer = ByteBuffer.allocateDirect((int) (flatSize * Float.BYTES)).order(ByteOrder.LITTLE_ENDIAN);
FloatBuffer floatBuffer = byteBuffer.asFloatBuffer();
tensor.data_ptr_float().get(flat);
floatBuffer.put(flat);
Expand Down

0 comments on commit 2a12088

Please sign in to comment.