JuliaSIMD / JuliaSIMD/LoopVectorization.jl

Support for RGB colors

Abierto
#67 9 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

Aside from #66, I think one of the last obstacles to using this in ImageFiltering is the handling of color array elements, for example `RGB(0.8f0, 0.3f0, 0.5f0)` (which is just a struct of 3 `Float32`s). Through TiledIteration it's possible to convert the data into a suitable format, for example `RGB{N0f8}` can be converted to `RGB{Float32}` because [`TileBuffer` takes an element type as an argument](https://github.com/JuliaArrays/TiledIteration.jl#allocating-and-managing-temporary-storage). (I note that's really old syntax, with modern Julia I should change it to `TileBuffer{T}(undef, tileaxs)`.) Consequently it will be converted before it is used; because convolution/correlation uses each element multiple times, this conversion is well worth doing if it gets us better performance and allows us to use this package. (Another benefit of copying is that we can guarantee stridedness.)

So the question is, what kind of format should I convert it to? Should we define explict support for RGB, or would it be better to convert to an `SVector{3}` or similar? I kind of favor the latter since it would presumably be more generic.

I suspect this will alter the loop unrolling/SIMD packing, once I understand what representation you'd like here.

Guía de contribución

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

Línea de trabajo

Start with the issue discussion and the linked TiledIteration TileBuffer documentation, then compare the proposed RGB and SVector representations for convolution and correlation. A decision on the supported representation and its effect on loop unrolling and SIMD packing is needed before implementation can be scoped.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
julia
Área
performance
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.