Cilk Plus/LLVM: Intel Cilk Plus C/C++ Language Extensions in LLVM
cilkplus.github.io
cilkplus.github.io
Mostly it's supported by Intel's ICC and ICPC compilers, but I was interested to see that it's been ported to LLVM.
There's a parallel project for GCC as well: https://www.cilkplus.org/build-gcc-cilkplus
Full support for Cilk Plus has been added to the GCC compiler. Cilk Plus is an extension to the C and C++ languages to support data and task parallelism
https://gcc.gnu.org/gcc-5/changes.html
Do you have any idea if support is likely to be built into clang as well?
I don't know what the status for Clang is, but I'd be surprised if they weren't mainlined soon; that's a largely uneducated opinion though...
Or is it just a compiler integrated green thread library?
The FAQ is really vague just says its makes interfacing with parallelism easier.
There's something about 'hyper objects' too which sound like race-condition safe objects for doing things like reductions.
Cilk was a language originally developed for parallelism by MIT, they developed a Cilk Plus revision, and it later adopted by Intel as Cilk++ (where they added more functionality and a few keywords). This is basically an OSS implementation of the language without all the "good stuff" that comes with the Intel Compiler. You get green threads (fibers in Intel's lexicon), an acceptable malloc which is swapped in thought appropriate, real threading (which marks off critical sections in the conventional fashion) as necessary, and the ability to use spawn/async (a conventional barrier-wait thinger).
They say "SIMD[check]" so in theory there are all of those AVX512 with the SIMD stuff (xmm0,16..ymm0-32? It's been a while since I've looked at the ISA) in here but I went through the code briefly and saw no reference to utilization of those registers. This page is really doing a real disservice to the language because where it really shines is in the tooling that integrates with the language. The Parallel Suite XE (priced around Visual Studio) lets you get some crazy-granular stuff for traditional number--crunching that GCC and LLVM doesn't produce (effectively leaving those registers unused). With ICC, to state the obvious, you get that functionality, as well as all the fantastic cluster analysis stuff. (n.b. VS with TPL does a not-too-bad-job at utilizing the AVX(edit: put in "AVR" originally ugh haha) subset of the ISA.)
edit: https://bitbucket.org/intelcilkruntime/intel-cilk-runtime/sr... Yeah.. not too much processor specific stuff. In that dir, a few files showed the impl details of their threads which was just a conventional mov $1, rax; mov $2,rbx, blah blah. Nothing special. There are references to the 'special sauce' (vla references) left in the code from "if __INTEL__COMPILER__" macros, so I'm guessing it's just a copy-paste. Shame, it's a great language/toolset.
[1] http://www.cs.cmu.edu/~chensm/Big_Data_reading_group/papers/...
Maybe I'm misunderstanding, but that's a very odd description of the execution units in a Skylake core. It might be better to say: "Skylake can sustain execution of 4 instructions per cycle, up to three of which can perform 256-bit vector operations." Section 2.1 here gives an exact diagram: http://www.intel.com/content/dam/www/public/us/en/documents/...
"
Enjoy having to put attribution in literally every Cilk binary you distribute :P
Full text:
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.