Skip to content

Commit a2b4e41

Browse files
committed
Better comment acl_kernel_if invocation queue
1 parent 47050cc commit a2b4e41

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

include/acl_kernel_if.h

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,19 @@ typedef struct {
3232

3333
// Accelerator details
3434
unsigned int num_accel;
35-
std::vector<std::vector<int>>
36-
accel_job_ids; //[num_accel][accel_invoc_queue_depth]
35+
36+
// Circular buffer that implements hardware kernel invocation queue
37+
// size: [num_accel][accel_invoc_queue_depth]
38+
std::vector<std::vector<int>> accel_job_ids;
39+
// Depth of hardware kernel invocation queue [num_accel]
40+
std::vector<unsigned int> accel_invoc_queue_depth;
41+
// Points to the last kernel that has been launched but not yet finished
42+
// [num_accel]
3743
std::vector<int> accel_queue_front;
44+
// Points to the last empty slot on hardware kernel invocation queue
45+
// where kernel at the next index is the next one to finish [num_accel]
3846
std::vector<int> accel_queue_back;
47+
3948
std::vector<acl_kernel_if_addr_range> accel_csr;
4049
std::vector<acl_kernel_if_addr_range> accel_perf_mon;
4150
std::vector<unsigned int> accel_num_printfs;
@@ -74,9 +83,6 @@ typedef struct {
7483
// e.g., in a future code refactoring.
7584
bool cra_ring_root_exist = false;
7685

77-
// Depth of hardware kernel invocation queue
78-
std::vector<unsigned int> accel_invoc_queue_depth;
79-
8086
// Track which of the kernels is the autorun profiling kernel (-1 if none)
8187
int autorun_profiling_kernel_id;
8288

0 commit comments

Comments
 (0)