Skip to content

handle loop-generating expressions #102

Open
@stev47

Description

@stev47

generating expressions could be transformed to traditional loops to make the following work

acc = 0
@avx for i in 1:10
    acc += sum(i+j for j in 1:5)
end

or for ntuple():

acc = 0
@avx for i in 1:10
    acc += sum(ntuple(j->i+j, Val(5)))
end

Edit: I guess this is related to handling anonymous functions, but at least the generator expression is directly available in the ast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions