@@ -254,7 +254,7 @@ template <class T> struct ZeCache : private T {
254
254
// it is going to initialize, since it is private here in
255
255
// order to disallow access other than through "->".
256
256
//
257
- typedef std::function<void (T &)> InitFunctionType ;
257
+ using InitFunctionType = std::function<void (T &)>;
258
258
InitFunctionType Compute{nullptr };
259
259
bool Computed{false };
260
260
pi_mutex ZeCacheMutex;
@@ -492,12 +492,12 @@ struct _pi_device : _pi_object {
492
492
// The helper structure that keeps info about a command queue groups of the
493
493
// device. It is not changed after it is initialized.
494
494
struct queue_group_info_t {
495
- typedef enum {
495
+ enum type {
496
496
MainCopy,
497
497
LinkCopy,
498
498
Compute,
499
499
Size // must be last
500
- } type ;
500
+ };
501
501
502
502
// Keep the ordinal of the commands group as returned by
503
503
// zeDeviceGetCommandQueueGroupProperties. A value of "-1" means that
@@ -614,10 +614,10 @@ struct pi_command_list_info_t {
614
614
};
615
615
616
616
// 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 > ;
619
619
// 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;
621
621
622
622
struct _pi_context : _pi_object {
623
623
_pi_context (ze_context_handle_t ZeContext, pi_uint32 NumDevices,
@@ -936,7 +936,7 @@ struct _pi_queue : _pi_object {
936
936
pi_command_list_map_t CommandListMap;
937
937
938
938
// Helper data structure to hold all variables related to batching
939
- typedef struct CommandBatch {
939
+ struct command_batch {
940
940
// These two members are used to keep track of how often the
941
941
// batching closes and executes a command list before reaching the
942
942
// QueueComputeBatchSize limit, versus how often we reach the limit.
@@ -954,7 +954,7 @@ struct _pi_queue : _pi_object {
954
954
// a queue specific basis. And by putting it in the queue itself, this
955
955
// is thread safe because of the locking of the queue that occurs.
956
956
pi_uint32 QueueBatchSize = {0 };
957
- } command_batch ;
957
+ };
958
958
959
959
// ComputeCommandBatch holds data related to batching of non-copy commands.
960
960
// CopyCommandBatch holds data related to batching of copy commands.
0 commit comments