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

change double to int in coalescing-global to avoid compiler warnings #2

Open
rcrovella opened this issue Sep 13, 2014 · 0 comments
Open

Comments

@rcrovella
Copy link
Contributor

Here:
https://github.com/parallel-forall/code-samples/blob/master/series/cuda-cpp/coalescing-global/coalescing.cu

lines 54 and 70 are passing a double for the second argument:

checkCuda( cudaMemset(d_a, 0.0, n * sizeof(T)) );

This is not really sensible and may trigger compiler warnings like this:

coalescing.cu:70: warning: passing âdoubleâ for argument 2 to âcudaError_t cudaMemset(void*, int, size_t)â

I would recommend changing those 2 instances of 0.0 to just 0

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

1 participant