Skip to content
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

Not working on ARM 32 bit #5

Open
VincentSC opened this issue Mar 7, 2019 · 1 comment
Open

Not working on ARM 32 bit #5

VincentSC opened this issue Mar 7, 2019 · 1 comment

Comments

@VincentSC
Copy link

When using arm-linux-gnueabi-gcc as a compiler it does not do the implicit conversion from cl_uint to long and causes the comparison where -1 and variables of type cl_uint to go wrong. When casting num_platforms and num_devices to long, it works.

If you use gcc -Wall -Wextra clinfo.c -o clinfo-x64 -lOpenCL -lm, you get a list of conversions, but I found these far from complete. Going to test on the arm32-compiler later.

clinfo.c: In function ‘main’:
clinfo.c:476:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
   if (specific_platform > -1 && i != specific_platform) continue;
                                   ^~
clinfo.c:545:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    if (specific_device > -1 && j != specific_device) continue;

Currently have done my edits on a local machine, so can't easily create a PR right now. I'm putting this issue so others know the code does not work correctly on some compilers, and I get remembered to make that PR when there is a reply on this.

@simleb
Copy link
Owner

simleb commented Sep 8, 2019

Feel free to fire a PR!

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

No branches or pull requests

2 participants