src/CodeGen_CoreIR_Target.cpp
/////////////////////////////////////////////////////
// Functions to identify expressions and variables //
/////////////////////////////////////////////////////
Functions to identify expressions and variables
Functions to identify expressions and variables
int CodeGen_CoreIR_Target::CodeGen_CoreIR_C::id_const_value(const Expr e) {
  if (const IntImm* e_int = e.as<IntImm>()) {
    return e_int->value;
  } else if (const UIntImm* e_uint = e.as<UIntImm>()) {
    return e_uint->value;
  } else {
    return -1;
  }
}
int CodeGen_CoreIR_Target :: CodeGen_CoreIR_C :: id_const_value ( const Expr e ) { if ( const IntImm * e_int = e . as < IntImm > ( ) ) { return e_int -> value ; } else if ( const UIntImm * e_uint = e . as < UIntImm > ( ) ) { return e_uint -> value ; } else { return -1 ; } }
Functions to identify expressions and variables
Functions to identify expressions and variables
//internal_error << "invalid constant expr\n";