BOOST_COMPUTE_ADAPT_STRUCT inside a macro?

22 views
Skip to first unread message

david.ser...@gmail.com

unread,
Jan 10, 2018, 7:20:09 AM1/10/18
to boost-compute

Hey,

I am trying to use the BOOST_COMPUTE_ADAPT_STRUCT on a struct/class inside a namespace. Is it possible?.

The way I am trying right now returns a long error:https://pastebin.com/g6j7xdsH
I wrote a simple example to show this behavior: https://github.com/lasdasdas/compute_example_macro


Thank you in advance.

Jakub Szuppe

unread,
Jan 10, 2018, 7:35:57 AM1/10/18
to boost-compute
Check https://github.com/boostorg/compute/blob/master/test/test_struct.cpp#L47

BOOST_COMPUTE_ADAPT_STRUCT can be used with a struct that is in namespace, but the
macro must be outside of any namespace, because it declares a struct and function template
specializations in boost::compute:: namespace.

david.ser...@gmail.com

unread,
Jan 10, 2018, 8:10:13 AM1/10/18
to boost-compute
Perfect, thank you.
Reply all
Reply to author
Forward
0 new messages