Now we focused on the NVIDIA CUDA architecture for this course,
but there are also some Cross Platform solutions that compile not only to CUDA
but to GPUs and multicore CPUs from AMD, Intel, or ARM.
Some of the tools and libraries we've already mentioned,
like Halite and Copperhead, specifically target CPU back ends.
Three other cross platform solutions worth mentioning are openCL, openGL Compute, and openACC.
You'll find that these first 2 are really similar to CUDA in the overall shape.
They share concepts such as thread blocks and shared memory,
even though the names and syntax vary.
For example, openCL refers to work groups rather than thread blocks.
But the basic ideas are isomorphic to CUDA,
and that's one reason why we focused on CUDA
is that what you learn there is really applicable in many places.
OpenGL compute, as the name implies,
is tightly integrative with the extremely popular openGL graphics library,
and this makes it a good choice for developers that are doing graphics
or image processing work who need to support multiple GPU vendors.
Now the third option, openACC, is a little different.
This is a directives based approach.
Directives are annotations that the programmer puts into his or her serial code
that help the compiler figure out how to automatically parallelize some of the loops.
For example, with the appropriate directives,
an openACC compiler can transform a nested for loop into a thread launch on CUDA
or a multi-threaded SIMD routine on a multicore CPU,
so often adding just a few lines to an existing code base can get dramatic speed ups.
And this is what makes openACC a great choice for programmers that have a large legacy code
that they want to parallelize.
OpenACC makes it easy and incremental to add parallelism to an existing code,
and it'll be very familiar to programmers that are used to using openMP.
The ACC stands for accelerators,
and Open ACC is essentially updating of OpenMP
to reflect the evolution of accelerators like the GPU.
Open ACC compilers exist for C, C++, and Fortran.