halide/Halide — pull request #203 by mmp (2013-12-11 00:38:10+00:00)
Title: Add support for passing a void * user context value to Halide functions;...

... if present,

this pointer is passed through to Halide runtime routines (halide_malloc, halide_printf,
etc.)

This change requires that all existing user-written Halide runtime routines be modified
to take a void * parameter as their first argument.

Open questions:
- Is it too gross to have the string "__user_context" in multiple places throughout the code, versus a constant?
- The get_user_context() function in Param.h: is there a better place for this to live? It seems that at minimum this would be better to have as e.g. a static method of Param, but then Param is templated while this really isn't a templated thing...