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

Found minor misstake on example code #2

Open
ashiba opened this issue Apr 7, 2021 · 1 comment
Open

Found minor misstake on example code #2

ashiba opened this issue Apr 7, 2021 · 1 comment

Comments

@ashiba
Copy link

ashiba commented Apr 7, 2021

I found minor misstake on examples/chapter02/checkDeviceInfor.cu.
The following code is written on line 40-42.

printf("  Total amount of global memory:                 %.2f MBytes (%llu "
           "bytes)\n", (float)deviceProp.totalGlobalMem / pow(1024.0, 3),
           (unsigned long long)deviceProp.totalGlobalMem);

https://github.com/deeperlearning/professional-cuda-c-programming/blob/master/examples/chapter02/checkDeviceInfor.cu#L40

Shouldn't %.2f MBytes be %.2f GBytes
The reason is that this value is obtained by dividing deviceProp.totalGlobalMem by pow(1024.0, 3).

@ashiba
Copy link
Author

ashiba commented Apr 7, 2021

I submitted the issue because I thought this repository is official, but maybe it's not?

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