Hi Guys.
I always use scalar data type under the AMD FX-8320 CPU. Now I want to try the vector data type. But I confuse the meaning about CL_DEVICE_PREFERRED_VECTOR_WIDTH_*. I query the specific information about the CPU,Output is that:
Preferred vector width char: 16
Preferred vector width short: 8
Preferred vector width int: 4
Preferred vector width long: 2
Preferred vector width float: 8
Preferred vector width double: 4

Let’s take CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT as a example, the number is 4. Does it means that one instruction can perform 4 data at one time?

The preferred vector width is the vector width that you should try to use on the device. If CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT is 4, for example, it means that on that device you should try to use int4 instead of just int or instead of, say, int16.