4 ms·
Must admit never tried it. Thanks for the insights I'll have a go at some point.
by peheje 6y ago
Must admit never tried it. Thanks for the insights I'll have a go at some point.
- dragontamer 6y agoIf you got an OpenMP 4.5 or later compiler (and GCC / CLang both support OpenMP), you can also use #pragma omp simd. https://www.openmp.org/spec-html/5.0/openmpsu42.html https://www.openmp.org/spec-html/5.0/openmpsu42.html Its not as reliable as a dedicated language like OpenCL or ISPC. But this might be easier for you to play with rather than learning another language. OpenMP is just #pragmas on top of your standard C, C++, or Fortran code. So any C / C++ / Fortran compiler can give this sort of thing a whirl rather easily. --------- OpenMP always was a fork-join model #pragma add on to C / C++. They eventually realized that their fork-join model works for SIMD, and finally added SIMD explicitly to their specification.