Typo in __max_varying_double. Add declarations for half functions. Use the gen_scatter macro to get the scatter functions.
Issue #40.