| RaftLib | |
|---|---|
| | |
| Original author | Jonathan Beard |
| Initial release | late 2014 |
| Stable release | 0.9 / January 2020 |
| Preview release | 1.0a / May 18, 2020 |
| Written in | C++ |
| Operating system | Linux, macOS, Windows |
| Type | Data analytics, HPC, Signal Processing, Machine Learning, Algorithms, Big Data |
| License | Apache License 2.0 |
| Website | www |
RaftLib [1] is a portable parallel processing system that aims to provide extreme performance while increasing programmer productivity. It enables a programmer to assemble a massively parallel program (both local and distributed) using simple iostream-like operators. RaftLib handles threading, memory allocation, memory placement, and auto-parallelization of compute kernels. [2] It enables applications to be constructed from chains of compute kernels forming a task and pipeline parallel compute graph. Programs are authored in C++ (although other language bindings are planned).
Here is a Hello World example for demonstration purposes: [3]
import<raft>;import<raftio>;importstd;usingString=std::string;usingRaftKernel=raft::kernel;usingRaftKernelStatus=raft::kstatus;usingRaftMap=raft::map;usingRaftPrint=raft::print;classHelloWorld:publicRaftKernel{public:HelloWorld(){output.addPort<String>("0");}virtualRaftKernelStatusrun(){output["0"].push("Hello World\n");returnraft::stop;}};intmain(intargc,char*argv[]){// instantiate print kernelRaftPrint<String>p;// instantiate hello world kernelHelloWorldhello;// make a map objectRaftMapm;// add kernels to map, both hello and p are executed concurrentlym+=hello>>p;// execute the mapm.exe();return0;}