Skip to content

Use correct calling convention on Windows. - #6

Open
estyrke wants to merge 1 commit into
ucb-sejits:masterfrom
estyrke:fix_calling_convention
Open

estyrke wants to merge 1 commit into
ucb-sejits:masterfrom
estyrke:fix_calling_convention

Conversation

@estyrke

@estyrke estyrke commented Sep 5, 2016

Copy link
Copy Markdown

OpenCL.dll uses stdcall calling convention (source), which means we need ctypes.windll instead of ctypes.cdll on Windows.

Verified that this fix works on Windows 10 with nVidia OpenCL library. Without this patch, I get

    clGetPlatformIDs.call(0, None, byref(num_platforms))
ValueError: Procedure called with not enough arguments (12 bytes missing) or wrong calling convention

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.

1 participant