Open Source Projects

If you have any questions or suggestions, please send mail to “David Fang” – dave@deepnology.com.

Meta Programming

1. A Simple C++ Meta Behavior Tree (without Parallel Node) Implementation using Boost.MPL library

test.hpp | metafunctions.hpp | meta_traversal.hpp | tree_builder.hpp | common_nodes.hpp | nodes.hpp | btree.hpp | behavior_tree.hpp
Design a MetaBehaviorTree class that uses “types” to define custom behavior tree configuration and builds the “type” of custom behavior tree configuration in compile time, which is similar to Boost.MetaStateMachine.

Concurrency

1. A Simple C++ Thread Pool class Implementation

ThreadPool.h
Design a ThreadPool class that manages a fixed given number of standby threads that are ready to perform concurrent task execution.
Tasks are in the form of a function whose signature is to return a string and take an arbitrary number of arguments.
The method that ThreadPool dispatches tasks should return immediately without a waiting time (asynchronous-callback).

2. A Simple C++ Thread Manager class Implementation

ThreadMgr.h
Design a ThreadMgr class that manages as many threads as required, depends on the current number of tasks, to perform concurrent task execution.
Tasks are in the form of a function whose signature is to return a string and take an arbitrary number of arguments.
The method that ThreadMgr dispatches tasks should return immediately without a waiting time (asynchronous-callback).

3. A Simple C++ Thread Timer class Implementation

ThreadTimer.h
Design a ThreadTimer class that manages as many threads as required, depends on the current number of tasks, to perform deferred concurrent task execution.
Tasks are in the form of a function whose signature is to return a string and take an arbitrary number of arguments.
Tasks are alone with a time index which is the starting time in the future for it to get executed.
The method that ThreadTimer dispatches tasks should return immediately without a waiting time (asynchronous-callback).

Hashing

1. A Simple C++ Consistent Hashing Map class Implementation

ConsistentHashing.h
Implement a simple hash map template class that supports uniform hash distribution (load balance), efficient resizing buckets and rehashing (consistent hashing).