Skip to content

Commit

Permalink
correct switch
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 2, 2024
1 parent 88667e5 commit a2809d1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,24 @@ private ShmBuilder()
*/
public static void build(NDArray tensor, String memoryName) throws IllegalArgumentException, IOException
{
System.out.println(tensor.getDataType().asNumpy());
switch (tensor.getDataType())
{
case UINT8:
buildFromTensorUByte(tensor, memoryName);
break;
case INT32:
buildFromTensorInt(tensor, memoryName);
break;
case FLOAT32:
buildFromTensorFloat(tensor, memoryName);
break;
case FLOAT64:
buildFromTensorDouble(tensor, memoryName);
break;
case INT64:
buildFromTensorLong(tensor, memoryName);
break;
default:
throw new IllegalArgumentException("Unsupported tensor type: " + tensor.getDataType().asNumpy());
}
Expand Down

0 comments on commit a2809d1

Please sign in to comment.