how to run on cpu graphics card

in function below when i select CPU
clGetDeviceIDs(platform_id,CL_DEVICE_TYPE_CPU,1,&device_id,&num_of_devices)
then opencl program or kernel run on CPU or Graphics card of CPU?

thanks

It will run on the CPU. If you want the GPU that is built into the CPU then you must specify CL_DEVICE_TYPE_GPU.

thank you
it means that if i am using 2 core CPU ,then it will utilize both core of CPU as it does in GPU (in which it utilizes all cores of GPU)

It will also, if possible, vectorize your code to use suitable SSE or AVX instructions.

and if i do not write opencl program then program will use only single core of CPU
or more?

pls reply if anybody knows that
in function below when i select CPU
clGetDeviceIDs(platform_id,CL_DEVICE_TYPE_CPU,1,&device_id,&num_of_devices)
then opencl program or kernel run on CPU and if my CPU have 4 core than the kernel utilize 4 core or single core means then it will be termed as a sequential program on CPU or not?

thanks

it should be executed on all 4 cores and should also be optimized to sse if possible. See the intel/amd specs for that. Or just have a look at your Taskmanager

anybody have the ans…

how many other answers do you need?

pls differentiate simple sequential c program and opencl CPU program ?
which should i compare with GPU ?
thanks

which should i compare with GPU and when ?
thanks

Bump…
Anyone actually know the answer to this?

This depends on the tasks you want to compare. But in general i would say you have to compare openCL CPU with openCL GPU when you just want to see if your parallelization with openCL is faster on one Hardware or the other.
If you want to see if your algorithm runs faster in parallel than in sequential, you have to compare any openCL Device with your sequential execution