Skip to content

Hangs with div in indices? #250

@mcabbott

Description

@mcabbott

Here's a stranger bug, this seems to run forever?

function act!(R, A, B, ax_i=1:4, ax_j=Base.OneTo(4))
    for j in ax_j
        for i in ax_i
            R[i, j] = A[2i + (j - 1) ÷ 2] + 0 * B[j]
        end
    end
    R
end
function act_avx!(R, A, B, ax_i=1:4, ax_j=Base.OneTo(4))
    @avx for j in ax_j
        for i in ax_i
            R[i, j] = A[2i + (j - 1) ÷ 2] + 0 * B[j]
        end
    end
    R
end

A, B = rand(10), rand(4)
act!(zeros(4,4), A, B)
act_avx!(zeros(4,4), A, B)  # needs ^C to exit?

Also found by CI in mcabbott/Tullio.jl#79, no urgent need... possibly I will remove the handling of ÷ in indices entirely. (This has bugs, e.g. mcabbott/Tullio.jl#76)

But I presume @avx should either reject this at once, or work.

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