Could these ifdefs be better served as part of the platform layer?  Calls to d* such as dMatFTranspose would then hide this large amount of #defines.  Wonder how hard that would be to add to the platform layer.  Not really sure.