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

Remove compile-time checks for deciding which OpenCL function should be used #94

Open
Beanavil opened this issue Dec 7, 2023 · 0 comments

Comments

@Beanavil
Copy link
Contributor

Beanavil commented Dec 7, 2023

In some samples, namely binaries, blur, reduce, multi-device and saxpy from samples/core, compile-time checks like the following

#if CL_HPP_TARGET_OPENCL_VERSION >= 200
    cl_command_queue_properties props[] = { CL_QUEUE_PROPERTIES,
                                            CL_QUEUE_PROFILING_ENABLE, 0 };
    OCLERROR_PAR(queue = clCreateCommandQueueWithProperties(context, device,
                                                            props, &error),
                 error, prg);
#else
    OCLERROR_PAR(queue = clCreateCommandQueue(
                     context, device, CL_QUEUE_PROFILING_ENABLE, &error),
                 error, prg);
#endif

are present for deciding whether the 1.x or 2.x version of a function should be used. These should either be removed completely (and use the 1.x version always) or substituted for runtime checks based on the properties of the device.

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