Skip to content

Commit 0899958

Browse files
committed
added work weights
1 parent d510fbc commit 0899958

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

tests/graph_vector_adapter.cpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ using namespace osp;
4444

4545
BOOST_AUTO_TEST_CASE(test_dag_vector_adapter) {
4646

47-
std::vector<int> vertices{0, 1, 2, 3, 4, 5, 6, 7};
48-
4947
std::vector<std::vector<int>> out_neighbors{{1, 2, 3}, {4, 6}, {4, 5}, {7}, {7}, {}, {}, {}};
5048

5149
std::vector<std::vector<int>> in_neighbors{{}, {0}, {0}, {0}, {1, 2}, {2}, {1}, {4, 3}};
@@ -57,9 +55,20 @@ BOOST_AUTO_TEST_CASE(test_dag_vector_adapter) {
5755

5856
graph_t graph(out_neighbors, in_neighbors);
5957

58+
for (auto v : graph.vertices()) {
59+
graph.set_vertex_work_weight(v, 10);
60+
}
61+
6062
BspInstance<graph_t> instance;
6163
instance.getComputationalDag() = graph;
62-
64+
65+
instance.getArchitecture().setProcessorsWithTypes({0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 , 1, 1, 1, 1, 1, 1, 1, 1 , 1, 1, 1, 1, 1, 1, 1, 1 , 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1});
66+
instance.setDiagonalCompatibilityMatrix(2);
67+
instance.setSynchronisationCosts(1000);
68+
instance.setCommunicationCosts(1);
69+
70+
71+
6372
// Set up the scheduler
6473
GrowLocalAutoCores<graph_constr_t> growlocal;
6574
BspLocking<graph_constr_t> locking;

0 commit comments

Comments
 (0)