nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/samediff/SameDiff.java
public static long getOpNum(String name, Op.Type type) {
        if (type == Op.Type.LOOP) {
            return 0;
        } else if (type == Op.Type.RETURN) {
            return 40;
        } else if (type == Op.Type.IF) {
            return 30;
        } else if (type == Op.Type.CONDITIONAL) {
            return 10;
        } else if (type == Op.Type.MERGE) {
            return 60L;
        } else if (type == Op.Type.LOOP_COND) {
            return 70L;
        } else if (type == Op.Type.NEXT_ITERATION) {
            return 80L;
        } else if (type == Op.Type.EXIT) {
            return 90L;
        } else if (type == Op.Type.ENTER) {
            return 100L;
        } else if (type == Op.Type.CUSTOM) {
            val name2 = Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase());
            if (name2 == null)
                return 0;
            return Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase()).getHash();

        } else
            return (long) Nd4j.getOpFactory().getOpNumByName(name);
    }
public static long getOpNum(String name, Op.Type type) {
        if (type == Op.Type.LOOP) {
            return 0;
        } else if (type == Op.Type.RETURN) {
            return 40;
        } else if (type == Op.Type.IF) {
            return 30;
        } else if (type == Op.Type.CONDITIONAL) {
            return 10;
        } else if (type == Op.Type.MERGE) {
            return 60L;
        } else if (type == Op.Type.LOOP_COND) {
            return 70L;
        } else if (type == Op.Type.NEXT_ITERATION) {
            return 80L;
        } else if (type == Op.Type.EXIT) {
            return 90L;
        } else if (type == Op.Type.ENTER) {
            return 100L;
        } else if (type == Op.Type.CUSTOM) {
            val name2 = Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase());
            if (name2 == null)
                return 0;
            return Nd4j.getExecutioner().getCustomOperations().get(name.toLowerCase()).getHash();

        } else
            return (long) Nd4j.getOpFactory().getOpNumByName(name);
    }
public static long getOpNum ( String name , Op . Type type ) { if ( type == Op . Type . LOOP ) { return 0 ; } else if ( type == Op . Type . RETURN ) { return 40 ; } else if ( type == Op . Type . IF ) { return 30 ; } else if ( type == Op . Type . CONDITIONAL ) { return 10 ; } else if ( type == Op . Type . MERGE ) { return 60L ; } else if ( type == Op . Type . LOOP_COND ) { return 70L ; } else if ( type == Op . Type . NEXT_ITERATION ) { return 80L ; } else if ( type == Op . Type . EXIT ) { return 90L ; } else if ( type == Op . Type . ENTER ) { return 100L ; } else if ( type == Op . Type . CUSTOM ) { val name2 = Nd4j . getExecutioner ( ) . getCustomOperations ( ) . get ( name . toLowerCase ( ) ) ; if ( name2 == null ) return 0 ; return Nd4j . getExecutioner ( ) . getCustomOperations ( ) . get ( name . toLowerCase ( ) ) . getHash ( ) ; } else return ( long ) Nd4j . getOpFactory ( ) . getOpNumByName ( name ) ; }
This method return operation ID for given op name/type pair.

@param name
@param type
@return
This method return operation ID for given op name / type pair .