Skip to content

Aligned allocation #24

Open
Open

Description

@sampotter

This seems like a very nice and useful little library. Definitely fills a need.

Would you be willing to include support for aligned allocation? This is handled a little differently on each platform, and providing a nice, platform independent interface to it that "just works" would be quite useful.

For instance, if you see lines 12-43 in this file, you can see my own attempt at this. Frankly, I have no confidence that I've done this the right way. :-)

(I'm considering using cymem in the library linked to above. Intel's Embree library requires memory to be allocated with alignment.)

Activity

  1. honnibal commented on Nov 25, 2020

    @honnibal
    Member

    Yes I'd be interested in that. We have support for changing the allocation function, so in theory aligned allocation shouldn't be so hard.

    The problem I have with aligned allocation is I never feel like I've done it properly =/. So I've never really seen a big performance increase.

  2. sampotter commented on Nov 25, 2020

    @sampotter
    Author

    I don't have enough experience with it to know when exactly to expect a performance boost. You need to use it in order to take full advantage of SIMD vectorization. I understand your uncertainty... In my case, it's simply a requirement for using Embree---memory that the user allocates must be allocated with a specific alignment.

    What can I do to help?

  3. polm commented on Sep 19, 2021

    @polm

    Sorry for the very late reply here, but if you want to start work on a PR for this I think we'd be happy to look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions