Write a program that uses OpenCL to do the following: Allow the user to enter whether they want to use a CPU or GPU devi

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Write a program that uses OpenCL to do the following: Allow the user to enter whether they want to use a CPU or GPU devi

Post by answerhappygod »

Write A Program That Uses Opencl To Do The Following Allow The User To Enter Whether They Want To Use A Cpu Or Gpu Devi 1
Write A Program That Uses Opencl To Do The Following Allow The User To Enter Whether They Want To Use A Cpu Or Gpu Devi 1 (109.11 KiB) Viewed 32 times
Write a program that uses OpenCL to do the following: Allow the user to enter whether they want 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: o Name of the platform that supports that device o Device type - CPU or GPU (CL_DEVICE_TYPE - either CL_DEVICE_TYPE_CPU or CL DEVICE_TYPE_GPU) O Device name (CL_DEVICE_NAME) o Number of compute units (CL_DEVICE_MAX_COMPUTE_UNITS) o Maximum work group size (CL_DEVICE_MAX_WORK_GROUP_SIZE) o Maximum number of work item dimensions (CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS) o Maximum work item sizes (CL_DEVICE_MAX_WORK_ITEM_SIZES) o Global memory size (CL_DEVICE_GLOBAL_MEM_SIZE) o Local memory size (CL_DEVICE_LOCAL_MEM_SIZE) (2 marks) • Based on the devices available, allow the user to select one device. Create a context using that device, and a command queue. (1 mark)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply