private void Constructed() { InstructionCustomFunction icfunc = d_instruction as InstructionCustomFunction; InstructionCustomOperator icop = d_instruction as InstructionCustomOperator; Cdn.Function f = null; if (icfunc != null) { f = icfunc.Function; } else if (icop != null) { f = icop.Operator.PrimaryFunction; } if (f == null) { return; } var args = f.Arguments; int offset = 0; for (int i = 0; i < args.Length; ++i) { if (args[i].Unused) { d_children.RemoveAt(i - offset); ++offset; } } }
private int[] InstructionSparsity(InstructionCustomFunction instr, SparsityInfo[] children, Dictionary <Variable, SparsityInfo> mapping) { return(FunctionSparsity(instr.Function, children, mapping)); }