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.

computer science

Description

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.

Instruction Files

Related Questions in computer science category