nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
public static byte getFlatOpType(Op.Type type) {
        switch (type) {
            case SCALAR:
                return OpType.SCALAR;
            case BROADCAST:
                return OpType.BROADCAST;
            case TRANSFORM:
            case SPECIAL:
                return OpType.TRANSFORM;
            case REDUCE:
                return OpType.ACCUMULATION;
            case REDUCE3:
                return OpType.ACCUMULATION3;
            case INDEXREDUCE:
                return OpType.INDEX_ACCUMULATION;
            case RANDOM:
                return OpType.RANDOM;
            case MERGE:
            case CONDITIONAL:
            case LOOP:
            case RETURN:
            case ENTER:
            case EXIT:
            case NEXT_ITERATION:
            case LOOP_COND:
            case IF:
                return OpType.LOGIC;
            case CUSTOM:
                return OpType.CUSTOM;
            case SHAPE:
                return OpType.SHAPE;
            case PAIRWISE:
                return OpType.PAIRWISE;
            case SUMMARYSTATS:
                return OpType.SUMMARYSTATS;
            default:
                throw new UnsupportedOperationException("Unknown op type passed in: " + type);
        }
    }
public static byte getFlatOpType(Op.Type type) {
        switch (type) {
            case SCALAR:
                return OpType.SCALAR;
            case BROADCAST:
                return OpType.BROADCAST;
            case TRANSFORM:
            case SPECIAL:
                return OpType.TRANSFORM;
            case REDUCE:
                return OpType.ACCUMULATION;
            case REDUCE3:
                return OpType.ACCUMULATION3;
            case INDEXREDUCE:
                return OpType.INDEX_ACCUMULATION;
            case RANDOM:
                return OpType.RANDOM;
            case MERGE:
            case CONDITIONAL:
            case LOOP:
            case RETURN:
            case ENTER:
            case EXIT:
            case NEXT_ITERATION:
            case LOOP_COND:
            case IF:
                return OpType.LOGIC;
            case CUSTOM:
                return OpType.CUSTOM;
            case SHAPE:
                return OpType.SHAPE;
            case PAIRWISE:
                return OpType.PAIRWISE;
            case SUMMARYSTATS:
                return OpType.SUMMARYSTATS;
            default:
                throw new UnsupportedOperationException("Unknown op type passed in: " + type);
        }
    }
public static byte getFlatOpType ( Op . Type type ) { switch ( type ) { case SCALAR : return OpType . SCALAR ; case BROADCAST : return OpType . BROADCAST ; case TRANSFORM : case SPECIAL : return OpType . TRANSFORM ; case REDUCE : return OpType . ACCUMULATION ; case REDUCE3 : return OpType . ACCUMULATION3 ; case INDEXREDUCE : return OpType . INDEX_ACCUMULATION ; case RANDOM : return OpType . RANDOM ; case MERGE : case CONDITIONAL : case LOOP : case RETURN : case ENTER : case EXIT : case NEXT_ITERATION : case LOOP_COND : case IF : return OpType . LOGIC ; case CUSTOM : return OpType . CUSTOM ; case SHAPE : return OpType . SHAPE ; case PAIRWISE : return OpType . PAIRWISE ; case SUMMARYSTATS : return OpType . SUMMARYSTATS ; default : throw new UnsupportedOperationException ( "Unknown op type passed in: " + type ) ; } }
This method converts enums for DataType

@param type
@return
This method converts enums for DataType