boostorg / compute

A C++ GPU Computing Library for OpenCL
http://boostorg.github.io/compute/
Boost Software License 1.0
1.55k stars 333 forks source link

Allow kernel argument to take custom struct by value #834

Open rosenrodt opened 5 years ago

rosenrodt commented 5 years ago

By specializing template<T> struct set_kernel_arg when expanding BOOST_COMPUTE_ADAPT_STRUCT, kernel input argument can now take custom struct by value. This potentially utilizes constant memory of the compute device

coveralls commented 5 years ago

Coverage Status

Coverage remained the same at 84.019% when pulling e1b96b36457997087952df710ceb722ff4ca5e8f on rosenrodt:pr-kernel-pass-struct-by-value into 36c89134d4013b2e5e45bc55656a18bd6141995a on boostorg:master.

rosenrodt commented 5 years ago

It looks like Apple platform regards custom struct as invalid kernel argument. That's weird because my 2016 Macbook works just fine