Skip to content

Documentation nits #101

@mlubin

Description

@mlubin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions