Forum Discussion
Altera_Forum
Honored Contributor
12 years agoThere are a lot of answers to that question because it depends on the kernel. In general I have these recommendations:
1) Use the __restrict keyword any time it's safe to do so (i.e. when you don't need to worry about pointers aliasing the same data) 2) Make sure you don't use the same pointer to dereference multiple memory spaces (i.e. in this case don't have a pointer that has to access both A and B, use multiple pointers instead) 3) Use __private temporary storage when possible I can't really comment on whether it makes sense for the algorithm to be split into multiple kernels. In general I try to keep everything combined into a single kernel since it's normally more effiicient to have a single pipeline than a bunch of independent pipelines in terms of performance and area.