Preprocessor define for when code is being compiled for compute? #894
Open
Description
Is there a preprocessor define enabled for when the code is being compiled for compute vs. the normal CPU compiler?
I would like to be able to re-use as much code as I can, but the HLSL intrinsics don't do anything on the CPU side, whereas the System.Math equivalents won't work on the GPU. I would prefer to write a wrapper function around the couple of intrinsics I am using that conditionally points to the appropriate function, rather than maintain parallel versions of all the code that uses these intrinsics.
Thanks!