Shadowrun: Awakened 29 September 2011 - Build 871
Classes | Typedefs | Functions
common.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  TreeNode

Typedefs

typedef float Value

Functions

Value OptimizedParallelSumTree (TreeNode *root)
Value SerialSumTree (TreeNode *root)
Value SimpleParallelSumTree (TreeNode *root)

Typedef Documentation

typedef float Value

Definition at line 29 of file common.h.


Function Documentation

Value OptimizedParallelSumTree ( TreeNode root)
Value SerialSumTree ( TreeNode root)

Definition at line 31 of file SerialSumTree.cpp.

References TreeNode::left, TreeNode::right, SerialSumTree(), and TreeNode::value.

Referenced by main(), and SerialSumTree().

                                      {
    Value result = root->value;
    if( root->left )
        result += SerialSumTree(root->left);
    if( root->right )
        result += SerialSumTree(root->right);
    return result;
}
Value SimpleParallelSumTree ( TreeNode root)

Definition at line 64 of file SimpleParallelSumTree.cpp.

References tbb::task::allocate_root(), and tbb::task::spawn_root_and_wait().

Referenced by main().


Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.

GNU Lesser General Public License 3 Sourceforge.net