Skip to content
Snippets Groups Projects
Commit 9b0fa285 authored by Peter Thedens's avatar Peter Thedens
Browse files

revert to correct files

parent 106a96f2
No related branches found
No related tags found
No related merge requests found
...@@ -188,10 +188,10 @@ double graph_get_output(const struct computation_graph *graph, int node_id, int ...@@ -188,10 +188,10 @@ double graph_get_output(const struct computation_graph *graph, int node_id, int
* a valid node ID is passed in to the first call of this function * a valid node ID is passed in to the first call of this function
*/ */
void graph_compute_node_rec(struct computation_graph *graph, int node_id, int depth) { void graph_compute_node_rec(struct computation_graph *graph, int node_id, int depth) {
// if (depth >= GRAPH_MAX_DEPTH) { if (depth >= GRAPH_MAX_DEPTH) {
// assert(1 == 0); assert(1 == 0);
// return; return;
// } }
// if (!graph_node_exists(graph, node_id)) { // if (!graph_node_exists(graph, node_id)) {
// return; // return;
// } // }
...@@ -199,7 +199,7 @@ void graph_compute_node_rec(struct computation_graph *graph, int node_id, int de ...@@ -199,7 +199,7 @@ void graph_compute_node_rec(struct computation_graph *graph, int node_id, int de
if (node->processed_state != UNPROCESSED) { if (node->processed_state != UNPROCESSED) {
return; return;
} }
// node->processed_state = DISCOVERED; node->processed_state = DISCOVERED;
int input_id; int input_id;
for (input_id = 0; input_id < node->type->n_inputs; input_id++) { for (input_id = 0; input_id < node->type->n_inputs; input_id++) {
int src_cntl_id = node->input_srcs[input_id].controller_id; int src_cntl_id = node->input_srcs[input_id].controller_id;
...@@ -225,7 +225,7 @@ void graph_compute_node_rec(struct computation_graph *graph, int node_id, int de ...@@ -225,7 +225,7 @@ void graph_compute_node_rec(struct computation_graph *graph, int node_id, int de
(*node->type->execute)(node->state, node->param_values, exec_input_vals, node->output_values); (*node->type->execute)(node->state, node->param_values, exec_input_vals, node->output_values);
} }
} }
// node->processed_state = PROCESSED; node->processed_state = PROCESSED;
} }
void graph_compute_nodes(struct computation_graph *graph, int* node_ids, int n_nodes) { void graph_compute_nodes(struct computation_graph *graph, int* node_ids, int n_nodes) {
......
...@@ -241,18 +241,18 @@ void test_that_new_nodes_can_be_created_by_ID() { ...@@ -241,18 +241,18 @@ void test_that_new_nodes_can_be_created_by_ID() {
int main() { int main() {
UNITY_BEGIN(); UNITY_BEGIN();
// RUN_TEST(test_adding_2_numbers); RUN_TEST(test_adding_2_numbers);
RUN_TEST(test_computing_cycles); RUN_TEST(test_computing_cycles);
// RUN_TEST(test_resetting_cycles); RUN_TEST(test_resetting_cycles);
// RUN_TEST(test_accumulator_state); RUN_TEST(test_accumulator_state);
// RUN_TEST(test_that_blocks_only_get_executed_once); RUN_TEST(test_that_blocks_only_get_executed_once);
// RUN_TEST(tests_that_already_connected_blocks_dont_get_reset); RUN_TEST(tests_that_already_connected_blocks_dont_get_reset);
// RUN_TEST(test_that_a_self_loop_computation_terminates); RUN_TEST(test_that_a_self_loop_computation_terminates);
// RUN_TEST(test_that_nodes_only_update_when_their_inputs_change); RUN_TEST(test_that_nodes_only_update_when_their_inputs_change);
// RUN_TEST(test_that_updates_propagate_only_to_their_children); RUN_TEST(test_that_updates_propagate_only_to_their_children);
// RUN_TEST(test_that_nodes_get_executed_when_updated_even_if_disconnected); RUN_TEST(test_that_nodes_get_executed_when_updated_even_if_disconnected);
// RUN_TEST(test_that_the_get_source_call_works_normally); RUN_TEST(test_that_the_get_source_call_works_normally);
// RUN_TEST(test_that_the_get_source_call_returns_ID_neg_1_when_invalid_ID_is_passed); RUN_TEST(test_that_the_get_source_call_returns_ID_neg_1_when_invalid_ID_is_passed);
// RUN_TEST(test_that_new_nodes_can_be_created_by_ID); RUN_TEST(test_that_new_nodes_can_be_created_by_ID);
return UNITY_END(); return UNITY_END();
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment