Skip to content

enum type size to match the definition in cl.h - #85

Merged
thewilsonator merged 1 commit into
libmir:masterfrom
takinutani:fix/get_info_type_enum
Dec 15, 2025
Merged

enum type size to match the definition in cl.h#85
thewilsonator merged 1 commit into
libmir:masterfrom
takinutani:fix/get_info_type_enum

Conversation

@takinutani

Copy link
Copy Markdown
Contributor

Resolves #84

The third parameter of clGetDeviceInfo() requires specifying the size of the retrieved data.
When retrieving enum type fields, the type size did not match the OpenCL specification.
(Enum base type is int, whereas the OpenCL specification uses cl_ulong)
Therefore, we were unable to obtain the correct information.

By aligning the enum base type with OpenCL types, we ensure that the correct values can be obtained.

@thewilsonator
thewilsonator merged commit f5bbded into libmir:master Dec 15, 2025
@thewilsonator

Copy link
Copy Markdown
Collaborator

Thanks!

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.

(OpenCL) device.type is incorrect

2 participants