← 返回首页
Use kDim instead of dim to avoid name collision by glavaux2 · Pull Request #2802 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Use kDim instead of dim to avoid name collision#2802

Merged
umar456 merged 3 commits into
arrayfire:masterfrom
glavaux2:gl/fix_clover
Mar 24, 2020
Merged

Use kDim instead of dim to avoid name collision#2802
umar456 merged 3 commits into
arrayfire:masterfrom
glavaux2:gl/fix_clover

Conversation

Copy link
Copy Markdown
Contributor

This is related to #2800

Copy link
Copy Markdown
Member

umar456 left a comment

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

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 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
Copy link
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

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

umar456 self-requested a review March 24, 2020 16:52
umar456 added this to the v3.7.1 milestone Mar 24, 2020
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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

Footer

© 2026 GitHub, Inc.