Triple-brackets for GPU computing with CUDA
The webpages provided in the answer by Jon Purdy and in the answer by Adám together provide a huge list of single-character delimiters, but after seeing the answer by nchistov which gives examples of "two-character delimiters" like <- [...] ->
in HTML and {% [...] %}
in Jinja, I'll go one step further and give an example of a "three-character delimiter" which is used a lot when programming for GPUs.
In CUDA, the "triple angle brackets" are used to make a call from a "host" (such as the main computer) to a "device" (such as one of the computer's GPUs). An example of this can be seen in line 2 of the following "Hello World" code:
int main( void ) {
kernel<<< 1, 1 >>>();
printf( "Hello, World!\n" );
return 0;
}
The numbers beween the triple angle brackets are the number of blocks per grid, and the number of threads per block (in that order), so in the above code, since all we were doing was "Hello World", it was a "single-threaded" operation with 1 thread per block and 1 block per grid, but if we wanted to make full use of the GPU by doing a "multi-threaded" operation, for example if we have the following:
add<<< 256, 1>>>()
instead of running the add()
function once, on a single-thread, we will have 256 copies of the kernel running in parallel.