Skip to content

Commit 5487223

Browse files
committed
Adds is_component and is_composite as dpctl aspect strings
1 parent 8c225f9 commit 5487223

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

libsyclinterface/helper/source/dpctl_utils_helper.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,12 @@ std::string DPCTL_AspectToStr(aspect aspectTy)
218218
case aspect::emulated:
219219
ss << "emulated";
220220
break;
221+
case aspect::ext_oneapi_is_component:
222+
ss << "is_component";
223+
break;
224+
case aspect::ext_oneapi_is_composite:
225+
ss << "is_composite";
226+
break;
221227
default:
222228
throw std::runtime_error("Unsupported aspect type");
223229
}
@@ -287,6 +293,12 @@ aspect DPCTL_StrToAspectType(const std::string &aspectTyStr)
287293
else if (aspectTyStr == "emulated") {
288294
aspectTy = aspect::emulated;
289295
}
296+
else if (aspectTyStr == "is_component") {
297+
aspectTy = aspect::ext_oneapi_is_component;
298+
}
299+
else if (aspectTyStr == "is_composite") {
300+
aspectTy = aspect::ext_oneapi_is_composite;
301+
}
290302
else {
291303
// \todo handle the error
292304
throw std::runtime_error("Unsupported aspect type");

0 commit comments

Comments
 (0)