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

Add get_info<Info>() specializations #72

Closed
kylelutz opened this issue Mar 19, 2014 · 1 comment
Closed

Add get_info<Info>() specializations #72

kylelutz opened this issue Mar 19, 2014 · 1 comment
Labels

Comments

@kylelutz
Copy link
Collaborator

Right now, the get_info<T>(enum) function allows users to retrieve values from the corresponding clGet*Info() functions.

However, the current API requires users to specify both the enum name (e.g. CL_DEVICE_LOCAL_MEM_SIZE) and the value type (e.g. cl_ulong).

We should add specializations for the known enum types with hard-coded return types. For example, the following test should pass:

device.get_info<CL_DEVICE_LOCAL_MEM_SIZE>() == device.get_info<cl_ulong>(CL_DEVICE_LOCAL_MEM_SIZE);

Care should be taken to ensure that only enum types available from the OpenCL version reported by cl.h are used. For example, don't try to use info enums from OpenCL 1.2 like CL_DEVICE_PRINTF_BUFFER_SIZE if CL_VERSION_1_2 is not defined.

@kylelutz
Copy link
Collaborator Author

kylelutz commented Jul 3, 2014

Implemented in PR #176

@kylelutz kylelutz closed this as completed Jul 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant