I'm trying to avoid MainEvaluate in CompiledFunction. I've tried below but I couldn't get rid of it. I'd appreciate any help!!
Here f1 and f2 will be rank 1 list with real type.
decision[f1_, f2_] := And @@ Thread[LessEqual[f1, f2]] && Or @@ Thread[Less[f1, f2]];
dominates = Compile[{{f1, _Real, 1}, {f2, _Real, 1}},
decision[f1, f2], {{decision[_, _], True | False}},
CompilationOptions ->{"InlineCompiledFunctions" -> True}];
<< CompiledFunctionTools`
CompilePrint[dominates]
decision[]is not compilable. Try rewriting it usingUnitStep[]. – Michael E2 Oct 12 '16 at 23:40f1less than or equal to the corresponding element off2and at least one the pairs unequal? – Michael E2 Oct 12 '16 at 23:42