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

Generator input validation #3200

Open
mohamedadaly opened this Issue Aug 8, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@mohamedadaly
Contributor

mohamedadaly commented Aug 8, 2018

Is there a way to validate inputs to a generator and make sure they satisfy some constraints?

For example

 ...
  Input<int> x{"x", 256};
  Input<int> y{"y", 256};
 ...

and I want x to be a multiple of y.

@steven-johnson

This comment has been minimized.

Show comment
Hide comment
@steven-johnson

steven-johnson Aug 8, 2018

Contributor

Not within the Inputs themselves, but you can use require() to add arbitrary constraints to any Halide expression.

Contributor

steven-johnson commented Aug 8, 2018

Not within the Inputs themselves, but you can use require() to add arbitrary constraints to any Halide expression.

@mohamedadaly

This comment has been minimized.

Show comment
Hide comment
@mohamedadaly

mohamedadaly Aug 8, 2018

Contributor

Awesome. Thanks!

Contributor

mohamedadaly commented Aug 8, 2018

Awesome. Thanks!

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