Add ConditionalSignatureBuilder
Aimed at resolving !2141 (diffs)
We now need even more options to handle queue priorities.
With this function, we can write:
sycl::property_list makeQueuePropertyList(bool inOrder, bool enableProfiling) {
auto builder = gmx::ConditionalSignatureBuilder();
return builder.addIf(inOrder, sycl::property::queue::in_order())
.addIf(enableProfiling, sycl::property::queue::enable_profiling())
.build<sycl::property_list>()
}
instead of
sycl::property_list makeQueuePropertyList(bool inOrder, bool enableProfiling) {
if (enableProfiling)
{
if (inOrder)
{
return { sycl::property::queue::in_order(), sycl::property::queue::enable_profiling() };
}
else
{
return { sycl::property::queue::enable_profiling() };
}
}
else
{
if (inOrder)
{
return { sycl::property::queue::in_order() };
}
else
{
return {};
}
}
}
Edited by Andrey Alekseenko