Forum Discussion
Altera_Forum
Honored Contributor
8 years agoWhat do you mean it "doesn't work"? You get some error or segfault or just incorrect output?
Your syntax for replicating the struct seems correct to me, but why do you even need to replicate it? If you just pass the struct itself as a kernel argument, every work-item in your kernel can access it without any issues. You should absolutely avoid pointer arithmetic in the kernel, though; it generally won't work as you expect it. You can always use printf in your kernel to see what is happening.