Write an OpenCL program that does the following:
• Allow the user to enter whether he/she wants to use a CPU or GPU device. Based on the user’s selection, search the system for all CPU or GPU devices. (Note that some systems have multiple CPUs and GPUs). (1 mark)
• Based on the user’s choice, display the following information for each CPU/GPU device
that is available on the system:
Based on the devices available, allow the user to select one device. Create a context using
that device, and a command queue.
• Find and display the number of kernels in the program. Create kernels from the program and
display all the kernel names.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
27 | 28 | 29 | 30 | 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |