Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for simple primitive creation #1250

Open
hkaiser opened this issue Sep 9, 2020 · 0 comments
Open

Allow for simple primitive creation #1250

hkaiser opened this issue Sep 9, 2020 · 0 comments

Comments

@hkaiser
Copy link
Member

hkaiser commented Sep 9, 2020

We should add a way that simplifies adding trivial primitives. Often the functionality of a primitive can be expressed by a single function. In this case, a user should be able to say something like:

using namespace phylanx::execution_tree;

primitive_argument_type my_primitive(primitive_arguments_type const args)
{
    // some functionality
}

register_primitive("my_primitive(_1)", "some documentation", &my_primitive);

Which should make my_function invocable in PhySL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant