heavy: add error checks, fix strict aliasing and prevent conflicts

heavy algo is still not working on linux, we have now error reporting

could be related to thrust stuff or a change in stratum stuff...