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

nbytes is coerced to UInt32 in Buffer outer constructor #193

Closed
ericproffitt opened this issue Dec 15, 2021 · 1 comment
Closed

nbytes is coerced to UInt32 in Buffer outer constructor #193

ericproffitt opened this issue Dec 15, 2021 · 1 comment

Comments

@ericproffitt
Copy link

Currently the nbytes argument of api.clCreateBuffer is converted to unsigned using cl_uint,

mem_id = api.clCreateBuffer(ctx.id, flags, cl_uint(nbytes),

I'm pretty sure this should be changed to unsigned(nbytes), otherwise it throws a truncation error when the buffer size is larger than Int(typemax(UInt32)).

@ericproffitt ericproffitt changed the title nbytes is coerced to UInt32 in Buffer.jl outer constructor. nbytes is coerced to UInt32 in Buffer outer constructor. Dec 15, 2021
@ericproffitt ericproffitt changed the title nbytes is coerced to UInt32 in Buffer outer constructor. nbytes is coerced to UInt32 in Buffer outer constructor Dec 15, 2021
@ericproffitt
Copy link
Author

just realized that this issue was already raised

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