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

Documentation nits #101

Open
mlubin opened this issue Jul 21, 2024 · 0 comments
Open

Documentation nits #101

mlubin opened this issue Jul 21, 2024 · 0 comments

Comments

@mlubin
Copy link

mlubin commented Jul 21, 2024

Hi, a nit for the comparison with JuMP:

Modeling Interface: ExaModels.jl requires users to specify the model equations always in the form of Generators. This restrictive structure allows ExaModels.jl to preserve the SIMD-compatible structure in the model equations.

  • There's nothing essentially different between generators and macros that JuMP uses; generators are syntactic sugar for a special case of abstract interpretation that macros do more generally.
  • It's possible to write non-SIMD-compatible structures using generators, e.g.:
julia> c = ExaCore();

julia> x = variable(c, 10);

julia> A = [[1,2,3], [4,5]];

julia> constraint(c, sum(x[i] for i in A[j]) for j in 1:2)
ERROR: ArgumentError: invalid index: ExaModels.ParSource() of type ExaModels.ParSource

For this point I would focus more on SIMD restriction per se rather than generators.

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

No branches or pull requests

1 participant