Skip to content

Make all Level::as_* methods available on all targets #334

Description

@danderson

Currently, Level::as_sse2, Level::as_neon and so forth are only implemented on the target where that feature could be available. For writing tests/benchmarks that want to run over all locally available levels, this means you have to combine the as_* checks with #[cfg] checks or you get a compile error.

Could we instead define all as_* methods on all targets, with the impls on mismatched targets unconditionally returning None ? That would also make it slightly easier to write dispatches to custom kernels for specific levels, because your general simd function can just as_neon() on all platforms instead of having to throw in target conditionals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions