Git Product home page Git Product logo

Comments (5)

dsmit avatar dsmit commented on June 6, 2024

Or, do a byte-by-byte head and tail loop around the SIMD stuff that loops till it aligned the data (or went through it), we need this anyway for small data sets.

For example, if a data set only contains 5 bytes, aligned or not, we can't feed it to SSE or AVX. (I wouldn't write stuff in MMX nowadays), the routines we have remain valid of course.

Also: LIBOIL / ORC.

from libvisual.

kaixiong avatar kaixiong commented on June 6, 2024

We probably don't need SIMD for small data sets. The overhead associated with SIMD state saving/switching, and the fact that there's little data to compute makes the effort not really worth the trouble, I would think. Doing proper alignment is also quite a lot simpler than making routines account for any kind of starting address.

from libvisual.

kaixiong avatar kaixiong commented on June 6, 2024

Did a few more checks on the Intarwebz; it's basically guaranteed by glibc and VC++ that malloc() returns 8-byte and 16-byte aligned pointers on 32-bit and 64-bit systems respectively.

http://msdn.microsoft.com/en-us/library/ycsb6wwf.aspx
http://www.gnu.org/software/libc/manual/html_node/Aligned-Memory-Blocks.html

from libvisual.

dsmit avatar dsmit commented on June 6, 2024

In regards to small data sets: Indeed no SIMD is needed here, but I don't think that having _small and _large API calls is a bit awkward ;-).

from libvisual.

kaixiong avatar kaixiong commented on June 6, 2024

Added visual_mem_alloc_aligned() and visual_mem_free_aligned() in bcf3193

from libvisual.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.