![]() |
Shadowrun: Awakened 29 September 2011 - Build 871
|
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) |
Definition at line 71 of file OptimizedParallelSumTree.cpp.
References tbb::task::allocate_root(), and tbb::task::spawn_root_and_wait().
Referenced by main().
{
Value sum;
OptimizedSumTask& a = *new(tbb::task::allocate_root()) OptimizedSumTask(root,&sum);
tbb::task::spawn_root_and_wait(a);
return sum;
}
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;
}
Definition at line 64 of file SimpleParallelSumTree.cpp.
References tbb::task::allocate_root(), and tbb::task::spawn_root_and_wait().
Referenced by main().
{
Value sum;
SimpleSumTask& a = *new(tbb::task::allocate_root()) SimpleSumTask(root,&sum);
tbb::task::spawn_root_and_wait(a);
return sum;
}
Copyright © 2007-2010 by The Shadowrun: Awakened Team. This work is licensed under the GNU Lesser General Public License 3.