-
Notifications
You must be signed in to change notification settings - Fork 8
Closed
Description
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.
sshin23
Metadata
Metadata
Assignees
Labels
No labels