@@ -254,7 +254,7 @@ template <class T> struct ZeCache : private T {
254254 // it is going to initialize, since it is private here in
255255 // order to disallow access other than through "->".
256256 //
257- typedef std::function<void (T &)> InitFunctionType ;
257+ using InitFunctionType = std::function<void (T &)>;
258258 InitFunctionType Compute{nullptr };
259259 bool Computed{false };
260260 pi_mutex ZeCacheMutex;
@@ -492,12 +492,12 @@ struct _pi_device : _pi_object {
492492 // The helper structure that keeps info about a command queue groups of the
493493 // device. It is not changed after it is initialized.
494494 struct queue_group_info_t {
495- typedef enum {
495+ enum type {
496496 MainCopy,
497497 LinkCopy,
498498 Compute,
499499 Size // must be last
500- } type ;
500+ };
501501
502502 // Keep the ordinal of the commands group as returned by
503503 // zeDeviceGetCommandQueueGroupProperties. A value of "-1" means that
@@ -614,10 +614,10 @@ struct pi_command_list_info_t {
614614};
615615
616616// The map type that would track all command-lists in a queue.
617- typedef std::unordered_map< ze_command_list_handle_t , pi_command_list_info_t >
618- pi_command_list_map_t ;
617+ using pi_command_list_map_t =
618+ std::unordered_map< ze_command_list_handle_t , pi_command_list_info_t > ;
619619// The iterator pointing to a specific command-list in use.
620- typedef pi_command_list_map_t ::iterator pi_command_list_ptr_t ;
620+ using pi_command_list_ptr_t = pi_command_list_map_t ::iterator;
621621
622622struct _pi_context : _pi_object {
623623 _pi_context (ze_context_handle_t ZeContext, pi_uint32 NumDevices,
@@ -936,7 +936,7 @@ struct _pi_queue : _pi_object {
936936 pi_command_list_map_t CommandListMap;
937937
938938 // Helper data structure to hold all variables related to batching
939- typedef struct CommandBatch {
939+ struct command_batch {
940940 // These two members are used to keep track of how often the
941941 // batching closes and executes a command list before reaching the
942942 // QueueComputeBatchSize limit, versus how often we reach the limit.
@@ -954,7 +954,7 @@ struct _pi_queue : _pi_object {
954954 // a queue specific basis. And by putting it in the queue itself, this
955955 // is thread safe because of the locking of the queue that occurs.
956956 pi_uint32 QueueBatchSize = {0 };
957- } command_batch ;
957+ };
958958
959959 // ComputeCommandBatch holds data related to batching of non-copy commands.
960960 // CopyCommandBatch holds data related to batching of copy commands.
0 commit comments