@@ -309,23 +309,21 @@ VkResult setupDevice(const sycl::device &dev) {
309309
310310 // Check if the device supports the optional extensions, if so add them to
311311 // the list of enabled device extensions.
312- std::for_each (std::begin (optionalExtensions), std::end (optionalExtensions),
313- [&](const char *optionalExt) -> void {
314- auto it =
315- std::find_if (std::begin (supportedDeviceExtensions),
316- std::end (supportedDeviceExtensions),
317- [&](const VkExtensionProperties &ext) {
318- return (ext.extensionName ==
319- std::string_view (optionalExt));
320- });
321- if (it != std::end (supportedDeviceExtensions)) {
322- enabledDeviceExtensions.push_back (optionalExt);
323- if (std::string_view (optionalExt) ==
324- VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME) {
325- supportsExternalSemaphore = true ;
326- }
327- }
328- });
312+ for (const char *optionalExt : optionalExtensions) {
313+ auto it = std::find_if (std::begin (supportedDeviceExtensions),
314+ std::end (supportedDeviceExtensions),
315+ [&](const VkExtensionProperties &ext) {
316+ return (ext.extensionName ==
317+ std::string_view (optionalExt));
318+ });
319+ if (it != std::end (supportedDeviceExtensions)) {
320+ enabledDeviceExtensions.push_back (optionalExt);
321+ if (std::string_view (optionalExt) ==
322+ VK_KHR_EXTERNAL_SEMAPHORE_EXTENSION_NAME) {
323+ supportsExternalSemaphore = true ;
324+ }
325+ }
326+ }
329327
330328 foundDevice = true ;
331329 std::cout << " Found suitable Vulkan device: "
0 commit comments