Skip to content

Commit 564a404

Browse files
committed
change address type to uint32 and use map size insteadd of mparsing from autodiscovery.
1 parent dceaee4 commit 564a404

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

include/acl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ typedef class acl_device_program_info_t *acl_device_program_info;
481481

482482
// Definition of device global.
483483
struct acl_device_global_mem_def_t {
484-
unsigned int address;
484+
uint32_t address;
485485
uint32_t size;
486486
};
487487

src/acl_auto_configure.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,6 @@ bool acl_load_device_def_from_str(const std::string &config_str,
517517
if (result && counters.back() > 0) {
518518
result =
519519
read_uint_counters(config_str, curr_pos, num_device_global, counters);
520-
devdef.num_device_global = num_device_global;
521520

522521
// read total number of fields in device global
523522
unsigned int total_fields_device_global = 0;
@@ -538,10 +537,10 @@ bool acl_load_device_def_from_str(const std::string &config_str,
538537
}
539538

540539
// read device global address
541-
unsigned int dev_global_addr = 0; // Default
540+
uint32_t dev_global_addr = 0; // Default
542541
if (result && counters.back() > 0) {
543-
result =
544-
read_uint_counters(config_str, curr_pos, dev_global_addr, counters);
542+
result = read_uint32_counters(config_str, curr_pos, dev_global_addr,
543+
counters);
545544
}
546545
// read device global address size
547546
uint32_t dev_global_size = 0; // Default

test/acl_auto_configure_test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ TEST(auto_configure, simple) {
270270
CHECK_EQUAL(1, (int)m_device_def.autodiscovery_def.accel[0].is_sycl_compile);
271271

272272
// Checks for device global entry.
273-
CHECK_EQUAL(2, m_device_def.autodiscovery_def.num_device_global);
273+
CHECK_EQUAL(2, m_device_def.autodiscovery_def.device_global_mem_defs.size());
274274
const auto kernel15_dev_global =
275275
m_device_def.autodiscovery_def.device_global_mem_defs.find(
276276
"kernel15_dev_global");

0 commit comments

Comments
 (0)