Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sycl/plugins/level_zero/pi_level_zero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ _pi_queue::resetCommandList(pi_command_list_ptr_t CommandList,
}

// Configuration of the command-list batching.
typedef struct CommandListBatchConfig {
struct zeCommandListBatchConfig {
// Default value of 0. This specifies to use dynamic batch size adjustment.
// Other values will try to collect specified amount of commands.
pi_uint32 Size{0};
Expand All @@ -1066,7 +1066,7 @@ typedef struct CommandListBatchConfig {
pi_uint32 startSize() const { return Size > 0 ? Size : DynamicSizeStart; }
// Tells is we are doing dynamic batch size adjustment.
bool dynamic() const { return Size == 0; }
} zeCommandListBatchConfig;
};

// Helper function to initialize static variables that holds batch config info
// for compute and copy command batching.
Expand Down
16 changes: 8 additions & 8 deletions sycl/plugins/level_zero/pi_level_zero.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ template <class T> struct ZeCache : private T {
// it is going to initialize, since it is private here in
// order to disallow access other than through "->".
//
typedef std::function<void(T &)> InitFunctionType;
using InitFunctionType = std::function<void(T &)>;
InitFunctionType Compute{nullptr};
bool Computed{false};
pi_mutex ZeCacheMutex;
Expand Down Expand Up @@ -492,12 +492,12 @@ struct _pi_device : _pi_object {
// The helper structure that keeps info about a command queue groups of the
// device. It is not changed after it is initialized.
struct queue_group_info_t {
typedef enum {
enum type {
MainCopy,
LinkCopy,
Compute,
Size // must be last
} type;
};

// Keep the ordinal of the commands group as returned by
// zeDeviceGetCommandQueueGroupProperties. A value of "-1" means that
Expand Down Expand Up @@ -614,10 +614,10 @@ struct pi_command_list_info_t {
};

// The map type that would track all command-lists in a queue.
typedef std::unordered_map<ze_command_list_handle_t, pi_command_list_info_t>
pi_command_list_map_t;
using pi_command_list_map_t =
std::unordered_map<ze_command_list_handle_t, pi_command_list_info_t>;
// The iterator pointing to a specific command-list in use.
typedef pi_command_list_map_t::iterator pi_command_list_ptr_t;
using pi_command_list_ptr_t = pi_command_list_map_t::iterator;

struct _pi_context : _pi_object {
_pi_context(ze_context_handle_t ZeContext, pi_uint32 NumDevices,
Expand Down Expand Up @@ -936,7 +936,7 @@ struct _pi_queue : _pi_object {
pi_command_list_map_t CommandListMap;

// Helper data structure to hold all variables related to batching
typedef struct CommandBatch {
struct command_batch {
// These two members are used to keep track of how often the
// batching closes and executes a command list before reaching the
// QueueComputeBatchSize limit, versus how often we reach the limit.
Expand All @@ -954,7 +954,7 @@ struct _pi_queue : _pi_object {
// a queue specific basis. And by putting it in the queue itself, this
// is thread safe because of the locking of the queue that occurs.
pi_uint32 QueueBatchSize = {0};
} command_batch;
};

// ComputeCommandBatch holds data related to batching of non-copy commands.
// CopyCommandBatch holds data related to batching of copy commands.
Expand Down