JuliaSIMD / JuliaSIMD/LoopVectorization.jl

Support vectorizing `rand`?

Abierto
#281 4 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Julia
Estrellas
789
Forks
73
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

I have no idea if it is possible to vectorize `rand`.

I hope for a usage like below:

```julia
julia> using LoopVectorization

julia> m = zeros(Float32, 4,4)
4×4 Matrix{Float32}:
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0

julia> a = rand(Float32, 4,4)
4×4 Matrix{Float32}:
0.251334 0.409923 0.591477 0.04535
0.4116 0.52253 0.34138 0.870923
0.24401 0.116969 0.583924 0.0549548
0.528378 0.898528 0.519574 0.172627

julia> b = rand(Float32, 4,4)
4×4 Matrix{Float32}:
0.874233 0.263186 0.000970364 0.411874
0.0680491 0.951124 0.803958 0.197752
0.669292 0.996646 0.0915098 0.652465
0.395592 0.875268 0.601194 0.518282

julia> @avxt for i in eachindex(m)
m[i] = rand(a[i]:1.0f3:b[i])
end
```

I have tried `VectorizedRNG` but I did not find out how to set boundries.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.