# LoopVectorization for sparse matrix operation : @turbo, LoopVectorization.check\_args

**URL:** <https://discourse.julialang.org/t/loopvectorization-for-sparse-matrix-operation-turbo-loopvectorization-check-args/95497>\
**Category:** Performance\
**Tags:** question\
**Created:** [March 3, 2023, 12:55pm UTC](https://discourse.julialang.org/t/loopvectorization-for-sparse-matrix-operation-turbo-loopvectorization-check-args/95497 "2023-03-03T12:55:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![whn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/whn/32/47386_2.png) [@whn](https://discourse.julialang.org/u/whn)\
**Post date:** [March 3, 2023, 12:55pm UTC](https://discourse.julialang.org/t/loopvectorization-for-sparse-matrix-operation-turbo-loopvectorization-check-args/95497/1 "2023-03-03T12:55:24Z")

</div>

I’m beginning programming in julia. I’m trying to vectorize a loop that generate V, a vector that describes data of a sparse matrix which support indices are defined by Vector{Int64} I and J.

u, K, v are contiguous f64 arrays

```julia
V = Vector{Float64}(undef, length(I))
@turbo for k in 1:(length(I))
            i, j = I[k], J[k]
            V[k] = u[i] * K[i,j] * v[j] 
 end

```

I get the message :

```julia
`LoopVectorization.check_args` on your inputs failed; running fallback `@inbounds @fastmath` loop instead.
│ Use `warn_check_args=false`, e.g. `@turbo warn_check_args=false ...`, to disable this warning.

```

I’m thinking that the problem is I browse u, K, v along I and J values which might be not supported by LoopVectorization.jl. I don’t have any knowledge on LLVM, maybe what I attempt is just impossible and vectorizing a loop that call getindex with indices depending on values of other arrays does’nt make any sense.

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [March 3, 2023, 1:38pm UTC](https://discourse.julialang.org/t/loopvectorization-for-sparse-matrix-operation-turbo-loopvectorization-check-args/95497/2 "2023-03-03T13:38:43Z")

</div>

yeah you can’t SIMD this
