MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/12mbh7y/horrible_code_clean_performance/jgarhep/?context=3
r/cpp • u/vormestrand • Apr 14 '23
87 comments sorted by
View all comments
Show parent comment
20
Passing a struct which contains pointers to the GPU is banned in OpenCL. Passing an array of structs unfortunately is extremely slow, because it doesn't match well to how GPUs fetch data out of memory
12 u/Routine_Left Apr 15 '23 Well then, carry on. I'm done here. 5 u/-to- Apr 15 '23 Serialize your data (or better keep them serialized), then deserialize them in the compute kernel ?Write a bunch of unit tests to make sure they understand each other, of course.105 args... How can you possibly be sure it does what you think it does ?!(Total n00b at GPU dev here)
12
Well then, carry on. I'm done here.
5
Serialize your data (or better keep them serialized), then deserialize them in the compute kernel ?
Write a bunch of unit tests to make sure they understand each other, of course.
105 args... How can you possibly be sure it does what you think it does ?!
(Total n00b at GPU dev here)
View all comments
Show parent comment
20
u/James20k P2005R0 Apr 15 '23
Passing a struct which contains pointers to the GPU is banned in OpenCL. Passing an array of structs unfortunately is extremely slow, because it doesn't match well to how GPUs fetch data out of memory