Altera_Forum
Honored Contributor
12 years agoAltera preprocessor definitions
Hi all OpenCL / FPGA hackers
I'm working on some OpenCL that I would like to run on our Bittware FPGA card and compare against GPU version (an obvious exercise, which I am sure many have already done). Now while OpenCL is portable, this does not translate to performance portability, so to make a fare comparison I should optimise the OpenCL for an ALtera FPGA and then for th NVidia Card... there should be plenty of code resuse but there will be certain vendor specific things ( num_simd_work_items on the Device side, or changing the kernel coding style significantly in places) so I'd like to do something like # ifdef __ALTERA__ // special optimised FPGA kernel code# else // GPU optimised kernel code# endif But I can find anything about such definitions being asserted by aoc Does anyone have insider information about the defintions made by aoc? If not then I can just manually assert -D__ALTERA__ and thats fine... but I'd like to know any proper defintions. Thank you in advanced,