Deprecate Param<void*>("__user_context"); add Target::UserContext

Forbid usage of Param<void*>("__user_context"). Instead:
-- custom user context values are specified when jitting by calling Func.set_custom_user_context
-- explicit user-context arguments for ahead-of-time compilation is now specified by adding Target::UserContext to the feature set when compiling. (When specified, the user context is always the first argument.)
% grep -r "\bassert(" test/ | wc -l
244




On Thu, Oct 23, 2014 at 10:27 AM, Dillon Sharlet <notifications@github.com>
wrote:

> In test/correctness/user_context_jit.cpp:
>
> > +#include <Halide.h>
> > +
> > +using namespace Halide;
> > +
> > +namespace {
> > +
> > +static void *context_pointer = (void *)0xf00dd00d;
> > +
> > +static bool called_error = false;
> > +static bool called_trace = false;
> > +static bool called_malloc = false;
> > +static bool called_free = false;
> > +
> > +void my_error(void *context, const char *msg) {
> > +    called_error = true;
> > +    assert(context == context_pointer);
>
> Do we always compile with asserts on? I think we do, but I'm slightly
> nervous about using assert to run validation that should always be done.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/halide/Halide/pull/525/files#r19292716>.
>