Skip to content

ERROR: UndefVarError: ##op#5321 not defined #45

@zsoerenm

Description

@zsoerenm

If I increment an index of one of the variables, I will get the error ##op#5321 not defined
MWE:

function complex_mul_with_index_offset(a_re, a_im, b_re, b_im, c_re, c_im)
    @avx for i = 1:length(a_re) - 1
        c_re[i] = b_re[i] * a_re[i + 1] - b_im[i] * a_im[i + 1]
        c_im[i] = b_re[i] * a_im[i + 1] + b_im[i] * a_re[i + 1]
    end
end
a_re = ones(Int, 64); a_im = copy(a_re); b_re = copy(a_re); b_im = copy(a_re); c_im = copy(a_re); c_re = copy(a_re)
julia> complex_mul_with_index_offset(a_re, a_im, b_re, b_im, c_re, c_im)
ERROR: UndefVarError: ##op#5321 not defined
Stacktrace:
 [1] sum_with_index_offset(::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}) at /home/zorn/.julia/packages/LoopVectorization/2jh99/src/reconstruct_loopset.jl:260

This does work, however:

function complex_mul_with_index_offset1(a_re, a_im, b_re, b_im, c_re, c_im)
    @avx for i = 1:length(a_re) - 1
        c_re[i] = b_re[i] * a_re[i + 1] - b_im[i] * a_im[i + 1]
    end
end

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