public int getBytesPerElement()

in source/neuropod/bindings/java/src/main/java/com/uber/neuropod/TensorType.java [47:62]


    public int getBytesPerElement(){
        switch (map.get(value)) {
            case FLOAT_TENSOR:
            case UINT32_TENSOR:
            case INT32_TENSOR: return 4;
            case DOUBLE_TENSOR:
            case UINT64_TENSOR:
            case INT64_TENSOR: return 8;
            case INT8_TENSOR:
            case UINT8_TENSOR: return 1;
            case UINT16_TENSOR:
            case INT16_TENSOR: return 2;
            case STRING_TENSOR: return -1;
        }
        return -1;
    }