Skip to content

implement pretty printing for ur_device_partition_property_t and ur_queue_property_t #412

@pbalcer

Description

@pbalcer

These two types are typedefs to intptr_t and are used for null-terminated arrays of key-value pairs.

    const ur_queue_property_t *pProps, ///< [in][optional] specifies a list of queue properties and their
                                       ///< corresponding values.
                                       ///< Each property name is immediately followed by the corresponding
                                       ///< desired value.
                                       ///< The list is terminated with a 0.
                                       ///< If a property value is not specified, then its default value will be used.
    const ur_device_partition_property_t *pProperties, ///< [in] null-terminated array of <$_device_partition_t enum, value> pairs.
    const ur_queue_property_t props[] = {UR_QUEUE_PROPERTIES_FLAGS, queryFlag,
                                         0};
    ASSERT_SUCCESS(urQueueCreate(context, device, props, &queue));

There doesn't seem to be a way to figure this out in the mako template, so this variable type will probably require a qualifier in desc to distinguish it from other _property_t enum types.

Parsing aside, the same could be achieved with a linked list through pNext, as we do for other things. That would be a bit better from a type safety perspective and consistent with other properties/desc types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    commonChanges or additions to common utilities

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions