forked from tillenius/superglue
-
Notifications
You must be signed in to change notification settings - Fork 0
SuperGlue -- A C++ Library for Data-Dependency Driven Task Parallelism
License
afshin-zafari/superglue
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
WHAT IS THIS? ------------- SuperGlue is a C++ library for task-parallelism, with data-dependent tasks. The programmer specifies tasks, and which data each task reads and writes, and SuperGlue uses this information to deduce dependencies. SHOW ME THE CODE! ----------------- An example where a single, independent task is created and executed: #include "superglue.hpp" #include <iostream> // Settings for SuperGlue. Here we use the defaults. struct Options : public DefaultOptions<Options> {}; // Define a task, with no dependencies. struct MyTask : public Task<Options> { void run() { std::cout << "Hello world!" << std::endl; } }; int main() { // The SuperGlue object starts the run-time system and starts // as many worker threads as there are cores. SuperGlue<Options> sg; // Create a task and submit it to SuperGlue sg.submit(new MyTask()); return 0; } Check the "examples/" directory for more examples. The above example is found in "examples/helloworld/". For an example with task dependencies, look at "examples/dependencies/". COMPILING AND INSTALLING ------------------------ SuperGlue is a header-only C++ template library. As such, it is not compiled as its own unit, but included into and compiled together with other code. The only setup that is needed is to add the "superglue/" directory to the include paths of the compiler, and enable pthreads support (compile with the -pthread flag). GETTING STARTED --------------- Running "make" will compile and run a few unit tests. Running "make examples" will compile all examples in the "examples/" directory. The "examples_dep/" directory contains examples with external dependencies.
About
SuperGlue -- A C++ Library for Data-Dependency Driven Task Parallelism
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- C++ 93.0%
- C 3.5%
- Python 2.5%
- Makefile 1.0%