static string templatePrototype(Intrinsic.Param p) { string type = p.type; type = type.stripPrefix("const ", "const\t"); return($"{type.mapType()} {p.varname}"); }
static bool isImm(Intrinsic.Param p) { if (p.type.EndsWith("int") && p.varname.StartsWith("imm")) { return(true); } if (p.type == "const int") { return(true); } if (p.type == "int" && (p.varname == "rounding" || p.varname == "count" || p.varname == "index" || p.varname == "scale")) { return(true); } return(false); }
static string argPrototype(Intrinsic.Param p) { return($"{p.type.mapType()} {p.varname}".Replace(" * ", " *")); }
static string argPrototypeUnsigned(Intrinsic.Param p) { string tp = "unsigned " + p.type; return($"{tp.mapType()} {p.varname}".Replace(" * ", " *")); }