Skip to content

Consider adt_const_params for intrinsics #607

Description

@nazar-pc

Adjacent to #605, I'm wondering whether it'd be acceptable to use adt_const_params for intrinsics like atomics.

Then this signature:

fn atomic_i_increment<I: Integer, const SCOPE: u32, const SEMANTICS: u32>(
    ptr: &mut I,
) -> I

Will change to something like this:

fn atomic_i_increment<I: Integer, const SCOPE: Scope, const SEMANTICS: Semantics>(
    ptr: &mut I,
) -> I

And usage will be something like this:

atomic_i_increment::<_, { Scope::QueueFamily }, { Semantics::NONE }>(..)

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