-
Notifications
You must be signed in to change notification settings - Fork 338
Add missing lambda wrappers for builtin OpenCL funcs #660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
90d106e
to
b3d8e49
Compare
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(abs_diff) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(add_sat) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(hadd) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(hradd) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.13.3 Integer functions, 4th function is:rhadd
not hradd
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(exp) | ||
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(exp2) | ||
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(exp10) | ||
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(fabs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.13.2 Math functions, expm1
is missing
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fmax) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fmin) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(fmod) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(hypot) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.13.2 Math functions: fract
and frexp
are missing
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(log1p) | ||
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(logb) | ||
BOOST_COMPUTE_LAMBDA_WRAP_TERNARY_FUNCTION(mad) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(nextafter) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.13.2 Math functions: maxmag
, minmag
, modf
& nan
are missing.
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(pown) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(powr) | ||
BOOST_COMPUTE_LAMBDA_WRAP_BINARY_FUNCTION(remainder) | ||
BOOST_COMPUTE_LAMBDA_WRAP_UNARY_FUNCTION_T(rint) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6.13.2 Math function: remquo
is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work Jakub. It was a much bigger change than I was expecting. I particularly liked that grouped and ordered the functions as in the OpenCL spec, it made reviewing much easier.
I only reviewed the changes for completeness against the OpenCL language spec. I've put comments where I think that functions are missing.
Also what about the optional half_*
and native_*
functions. Should they also be included?
Thanks for the comments, I'll look at them later today. |
b3d8e49
to
e8897de
Compare
I just need to add |
/// vector_type_producer<int_, 1>::type == int_ | ||
/// \endcode | ||
template<class Scalar, size_t N> | ||
struct vector_type_producer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this the same as make_vector_type<T, N>
from <boost/compute/type_traits/make_vector_type.hpp>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, you're right. I couldn't find it. I'll remove it.
Thanks for adding the rest of these! Yeah, I don't think I skipped them on purpose, just never got around to adding them. |
e8897de
to
0705750
Compare
I'll add |
0705750
to
e25bb7d
Compare
Merged! Thanks for adding all these! |
I've just tested the merged changes in the develop branch against the original failing code for issue #659 and I'm delighted to report that it's definitely fixed the issue for normalize and atan2. Thanks again Jakub. |
Glad, I could help. |
I added a few missing lambda wrappers for OpenCL builtin function (see #659), but I noticed that a lot more is missing. @kylelutz, did you skip them on purpose or should I add all of them?