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

Support for set_arg on macOS #748

Closed henryiii closed 5 years ago

henryiii commented 6 years ago

Currently, macOS does not support set_arg with some datatypes. This was partially fixed in #737, but it does not work if the user does not manually specify the <boost/compute/types.hpp> header manually.

This PR is expected to fail to build on macOS on the first build. It will then need to be fixed.

See ddemidov/vexcl#227 for more info.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 83.766% when pulling c01065e5531da065af923c277b41f780843d289b on henryiii:add_test_mactypes into 7daca6fc1ff289022c46fc6466565586f68f2244 on boostorg:develop.

ddemidov commented 6 years ago

@henryiii , can you try to add https://github.com/ddemidov/compute/commit/8f77efd0ef1aeeeed09fd097a675daa4eb9da644 to this PR? I believe that should fix the issue.

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 83.766% when pulling 70aa256ec439c0b72738e8e9cbfc8279f5c128c7 on henryiii:add_test_mactypes into 7daca6fc1ff289022c46fc6466565586f68f2244 on boostorg:develop.

ddemidov commented 6 years ago

I think the problem now is that test_kernels.cpp does not include compute/core.hpp. And we can not include types.hpp into the kernel.hpp, because types.hpp specializes some templates only declared in kernel.hpp. So may be the best solution for the failing test would be to either include core.hpp instead of kernel.hpp, or include types.hpp after kernel.hpp.

henryiii commented 6 years ago

It bothers me that include order matters. Clang can even warn if includes are not sorted in alphabetical order.

Couldn't types include kernel, since it works on the contents?

Couldn't the types it specializes be declared first?

coveralls commented 6 years ago

Coverage Status

Coverage remained the same at 84.02% when pulling 4ab09396638c8f0164c78bd21d5ab69e7f07e508 on henryiii:add_test_mactypes into 827371af22eda723d68133ae48c8ef822cfbc209 on boostorg:develop.

henryiii commented 6 years ago

I believe this fix is okay to add.