Skip to content

Instantly share code, notes, and snippets.

@ethanrublee
Created September 10, 2011 07:16
Show Gist options
  • Save ethanrublee/1208057 to your computer and use it in GitHub Desktop.
Save ethanrublee/1208057 to your computer and use it in GitHub Desktop.
A sample of what spore decl might look like
struct Add
{
static void declare_io(const ecto::tendrils& p, ecto::tendrils& i, ecto::tendrils& o)
{
i.declare(&Add::left_,"left");
i.declare(&Add::right_,"right");
o.declare(&Add::out_,"out");
}
int process(const tendrils& /*inputs*/, const tendrils& /*outputs*/)
{
*out_ = *left_ + *right_;
return ecto::OK;
}
ecto::spore<double> out_, left_, right_;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment