Skip to content
Snippets Groups Projects
Commit 8c3a6f7c authored by dawehr's avatar dawehr
Browse files

Fixed last line endings?

parent 4d6bafca
No related branches found
No related tags found
1 merge request!8Controller network
#include "node_pow.h" #include "node_pow.h"
#include <stdlib.h> #include <stdlib.h>
#include <math.h> #include <math.h>
static void pow_nodes(void *state, const double* params, const double *inputs, double *outputs) { static void pow_nodes(void *state, const double* params, const double *inputs, double *outputs) {
outputs[POW_RESULT] = pow(inputs[POW_BASE], params[POW_EXP]); outputs[POW_RESULT] = pow(inputs[POW_BASE], params[POW_EXP]);
} }
static void reset(void *state) {} static void reset(void *state) {}
static const char* const in_names[1] = {"Base"}; static const char* const in_names[1] = {"Base"};
static const char* const out_names[1] = {"Result"}; static const char* const out_names[1] = {"Result"};
static const char* const param_names[1] = {"Exponent"}; static const char* const param_names[1] = {"Exponent"};
const struct graph_node_type node_pow_type = { const struct graph_node_type node_pow_type = {
.input_names = in_names, .input_names = in_names,
.output_names = out_names, .output_names = out_names,
.param_names = param_names, .param_names = param_names,
.n_inputs = 1, .n_inputs = 1,
.n_outputs = 1, .n_outputs = 1,
.n_params = 1, .n_params = 1,
.execute = pow_nodes, .execute = pow_nodes,
.reset = reset .reset = reset
}; };
int graph_add_node_pow(struct computation_graph *graph, const char* name) { int graph_add_node_pow(struct computation_graph *graph, const char* name) {
return graph_add_node(graph, name, &node_pow_type, NULL); return graph_add_node(graph, name, &node_pow_type, NULL);
} }
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