OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Native Client Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be found | |
3 // in the LICENSE file. | |
4 | |
5 #include "webgtt/taskmap.h" | |
6 | |
7 #include <boost/bind.hpp> | |
8 | |
9 #include <vector> | |
10 | |
11 #include "webgtt/algorithms.h" | |
12 #include "webgtt/graph.h" | |
13 | |
14 namespace webgtt { | |
15 | |
16 TaskMap::TaskMap(const graph::Graph& input_graph, | |
17 const std::vector<int>& args) { | |
18 assert(static_cast<int>(args.size()) >= kMaxArgs); | |
19 // taskID 0 : Graph coloring : no arguments needed. | |
20 FunctionInfo coloring_function_info; | |
21 coloring_function_info.number_of_arguments = 0; | |
22 coloring_function_info.function_to_call = boost::bind(GetColoring, | |
23 input_graph); | |
24 task_map_.push_back(coloring_function_info); | |
25 } | |
26 | |
27 } // namespace webgtt | |
OLD | NEW |