Skip to content

Conversation

@glavaux2
Copy link
Contributor

This is related to #2800

Copy link
Member

@umar456 umar456 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for debugging this and submitting the changes. Could you please rename the variable to kDim instead of _af_dim. I want to avoid making a variable name starting with an underscore which is usually reserved for system headers and compilers. Otherwise this looks good although this is will most likely break in the future because this is a bug that is only a problem in one platform. I think it would be better to to have some sort of assert in the header which will cause this to fail in any platform. I guess we can handle that in another PR.

@glavaux2 glavaux2 changed the title Use _af_dim_ instead of dim to avoid name collision Use kDim instead of dim to avoid name collision Mar 23, 2020
@glavaux2
Copy link
Contributor Author

I have renamed to kDim which looks like working on Mesa AMD Clover

options << " -D To=" << dtype_traits<To>::getName()
<< " -D Ti=" << dtype_traits<Ti>::getName()
<< " -D dim=" << dim;
<< " -D kDim=" << dim;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

join.cl OpenCL kernel doesn't use this one at all. I wonder why it's being passed to this at all.

@umar456 umar456 self-requested a review March 24, 2020 16:52
@umar456 umar456 added this to the v3.7.1 milestone Mar 24, 2020
@umar456 umar456 merged commit 5d62cbd into arrayfire:master Mar 24, 2020
umar456 pushed a commit to umar456/arrayfire that referenced this pull request Mar 26, 2020
* Use kDim instead of dim to avoid name collision with some OpenCL implementations(AMD) in kernels.

Co-authored-by: LAVAUX Guilhem <lavaux@iap.fr>
umar456 pushed a commit that referenced this pull request Mar 27, 2020
* Use kDim instead of dim to avoid name collision with some OpenCL implementations(AMD) in kernels.

Co-authored-by: LAVAUX Guilhem <lavaux@iap.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants