Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do OpenCL vector types use SIMD

I currently have a large array of floats that I process in my OpenCL kernel i am wondering if i divide this array up and use an OpenCL vector type array instead, if it will speed up the process. Basically if i had an array of 4,800 floats i would divide it up into an array of 300 float16 vectors. Would this take advantage of SIMD?

like image 239
A Person Avatar asked Aug 29 '11 18:08

A Person


1 Answers

Intel actually describes what their OpenCL SDK does: see Writing Optimal OpenCL™ Code with Intel® OpenCL SDK. You might want to check that out, as an addition to benchmarking. The interesting part starts at chapter 2.3.

To answer your question: yes, it will take advantage of SIMD. But to "maximize utilization of the CPU vector units by using vector data types" you should really read that document.

like image 103
w-m Avatar answered Oct 14 '22 03:10

w-m