Dear Intel users, I'm using ifort 13.1.3 under Linux.
I would like to vectorize the inner loop but I'm not sure that the inner loop is a good candidate. This is the loop:
do i = 1, base_dim x = log( real(n + 1) / real(base(i)) ) npow = floor(x) sk = n do j = npow, 0, -1 bk = base(i)**j nk = floor( real(sk) / real(bk) ) sk = sk - nk * bk q(i) = q(i) + real(nk) / real(bk * base(i)) end do end do
n, base and base_dim are function input. The loop is not vectorized due a dependency in a line sk = sk - nk*bk. I'm not sure that this is a prefix sum case, because each value depends on sk at the prevoius step. Do you have an idea?
Thanks in advance.