Skip to content

Use memory alignment so that SSE2 can be used with dSFMT #21

@bashtage

Description

@bashtage

dSFMT fails using generic memory alignment since there are no guarantees that memory is aligned on a 16 byte boundary when allocated by python. This means that is will probably be necessary to directly allocate memory for the state so that it can be over provisioned to guarantee alignment.

This will require a non-trivial change and will probably necessitate adding __dealloc__ to the RandomState class as well as PRNG-specific state initializers/destructors, e.g. _alloc_state(rng_state* rng) and _dealloc_state(rng_state* rng). This path might also require adding a variable or two to contain the original pointer so that it can be freed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions