Forum Discussion
Altera_Forum
Honored Contributor
12 years agoThe recommendation of placing all the kernels into a single file is for performance reasons. You can compile each kernel separately, but just keep in mind that there is an overhead associating to swaping out kernels during the run time. This limitation is due to the fact that the underlining hardware changes (on GPUs they just swap out microcode).
To place all your kernels into a single file you just copy and paste all the sources into a single .cl file and compile it. When you invoke aoc.exe it's compiling the .cl file, not an individual kernel, so just by putting all your code into a single .cl file causes the compiler to create a hardware image with all your kernels within it.