Forum Discussion
Altera_Forum
Honored Contributor
11 years agoThank you! I am just wondering if I call a "sub" function from my "main" kernel multiple times (ie function call is under a "for" loop) would it cause higher overhead, or cause the compiler to use more hardware? Will this way (use one kernel to call sub functions) of programming in general cause the higher hardware utilization or degrade performance compare to having multiple smaller kernels?
--- Quote Start --- There is currently no way to specify that kernels in a source file are will be launched/run non-concurrently. The compiler always assumes that they may run simultaneously, so there is no resource sharing (either local memory or other resources) across distinct kernels. If you want to share resources, then you can currently do this manually - define a single kernel with a local memory system, and then call sub-functions from that kernel that define the functionality of the independent kernels. You can pass a local memory pointer to those "kernel" sub-functions. --- Quote End ---