Forum Discussion
Altera_Forum
Honored Contributor
8 years ago --- Quote Start --- What 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. --- Quote End --- I have tried printf but I was getting zeros when trying to print a double value. I did enable the intel specification for printf but nothing. Anyway I need a method to get copies of structs and transfer them to the kernel because I cannot make the work-items to work on the same data. It must be duplicated. The types of errors I am getting now are of type violation reading/writing.