@@ -194,6 +194,9 @@ inline ur_result_t printFlag<ur_map_flag_t>(std::ostream &os, uint32_t flag);
194
194
template <>
195
195
inline ur_result_t printFlag<ur_usm_migration_flag_t>(std::ostream &os, uint32_t flag);
196
196
197
+ template <>
198
+ inline ur_result_t printFlag<ur_exp_device_2d_block_array_capability_flag_t>(std::ostream &os, uint32_t flag);
199
+
197
200
template <>
198
201
inline ur_result_t printFlag<ur_exp_image_copy_flag_t>(std::ostream &os, uint32_t flag);
199
202
@@ -328,6 +331,7 @@ inline std::ostream &operator<<(std::ostream &os, [[maybe_unused]] const struct
328
331
inline std::ostream &operator<<(std::ostream &os, enum ur_execution_info_t value);
329
332
inline std::ostream &operator<<(std::ostream &os, enum ur_map_flag_t value);
330
333
inline std::ostream &operator<<(std::ostream &os, enum ur_usm_migration_flag_t value);
334
+ inline std::ostream &operator<<(std::ostream &os, enum ur_exp_device_2d_block_array_capability_flag_t value);
331
335
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_image_copy_flag_t value);
332
336
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_sampler_cubemap_filter_mode_t value);
333
337
inline std::ostream &operator<<(std::ostream &os, enum ur_exp_external_mem_type_t value);
@@ -2665,6 +2669,9 @@ inline std::ostream &operator<<(std::ostream &os, enum ur_device_info_t value) {
2665
2669
case UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP:
2666
2670
os << "UR_DEVICE_INFO_LOW_POWER_EVENTS_EXP";
2667
2671
break;
2672
+ case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP:
2673
+ os << "UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP";
2674
+ break;
2668
2675
default:
2669
2676
os << "unknown enumerator";
2670
2677
break;
@@ -4472,6 +4479,19 @@ inline ur_result_t printTagged(std::ostream &os, const void *ptr, ur_device_info
4472
4479
4473
4480
os << ")";
4474
4481
} break;
4482
+ case UR_DEVICE_INFO_2D_BLOCK_ARRAY_CAPABILITIES_EXP: {
4483
+ const ur_exp_device_2d_block_array_capability_flags_t *tptr = (const ur_exp_device_2d_block_array_capability_flags_t *)ptr;
4484
+ if (sizeof(ur_exp_device_2d_block_array_capability_flags_t) > size) {
4485
+ os << "invalid size (is: " << size << ", expected: >=" << sizeof(ur_exp_device_2d_block_array_capability_flags_t) << ")";
4486
+ return UR_RESULT_ERROR_INVALID_SIZE;
4487
+ }
4488
+ os << (const void *)(tptr) << " (";
4489
+
4490
+ ur::details::printFlag<ur_exp_device_2d_block_array_capability_flag_t>(os,
4491
+ *tptr);
4492
+
4493
+ os << ")";
4494
+ } break;
4475
4495
default:
4476
4496
os << "unknown enumerator";
4477
4497
return UR_RESULT_ERROR_INVALID_ENUMERATION;
@@ -9455,6 +9475,64 @@ inline ur_result_t printFlag<ur_usm_migration_flag_t>(std::ostream &os, uint32_t
9455
9475
}
9456
9476
} // namespace ur::details
9457
9477
///////////////////////////////////////////////////////////////////////////////
9478
+ /// @brief Print operator for the ur_exp_device_2d_block_array_capability_flag_t type
9479
+ /// @returns
9480
+ /// std::ostream &
9481
+ inline std::ostream &operator<<(std::ostream &os, enum ur_exp_device_2d_block_array_capability_flag_t value) {
9482
+ switch (value) {
9483
+ case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD:
9484
+ os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD";
9485
+ break;
9486
+ case UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE:
9487
+ os << "UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE";
9488
+ break;
9489
+ default:
9490
+ os << "unknown enumerator";
9491
+ break;
9492
+ }
9493
+ return os;
9494
+ }
9495
+
9496
+ namespace ur::details {
9497
+ ///////////////////////////////////////////////////////////////////////////////
9498
+ /// @brief Print ur_exp_device_2d_block_array_capability_flag_t flag
9499
+ template <>
9500
+ inline ur_result_t printFlag<ur_exp_device_2d_block_array_capability_flag_t>(std::ostream &os, uint32_t flag) {
9501
+ uint32_t val = flag;
9502
+ bool first = true;
9503
+
9504
+ if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD) {
9505
+ val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD;
9506
+ if (!first) {
9507
+ os << " | ";
9508
+ } else {
9509
+ first = false;
9510
+ }
9511
+ os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_LOAD;
9512
+ }
9513
+
9514
+ if ((val & UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) == (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE) {
9515
+ val ^= (uint32_t)UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE;
9516
+ if (!first) {
9517
+ os << " | ";
9518
+ } else {
9519
+ first = false;
9520
+ }
9521
+ os << UR_EXP_DEVICE_2D_BLOCK_ARRAY_CAPABILITY_FLAG_STORE;
9522
+ }
9523
+ if (val != 0) {
9524
+ std::bitset<32> bits(val);
9525
+ if (!first) {
9526
+ os << " | ";
9527
+ }
9528
+ os << "unknown bit flags " << bits;
9529
+ } else if (first) {
9530
+ os << "0";
9531
+ }
9532
+ return UR_RESULT_SUCCESS;
9533
+ }
9534
+ } // namespace ur::details
9535
+ ///////////////////////////////////////////////////////////////////////////////
9458
9536
/// @brief Print operator for the ur_exp_image_copy_flag_t type
9459
9537
/// @returns
9460
9538
/// std::ostream &
0 commit comments