@@ -316,12 +316,12 @@ handler::handler(std::shared_ptr<detail::queue_impl> Queue,
316
316
bool CallerNeedsEvent)
317
317
: handler(Queue, Queue, nullptr , CallerNeedsEvent) {}
318
318
319
- handler::handler (std::shared_ptr<detail::queue_impl> Queue,
320
- std::shared_ptr<detail::queue_impl> PrimaryQueue,
321
- std::shared_ptr<detail::queue_impl> SecondaryQueue,
322
- bool CallerNeedsEvent)
319
+ handler::handler (
320
+ std::shared_ptr<detail::queue_impl> Queue,
321
+ std::shared_ptr<detail::queue_impl> PrimaryQueue,
322
+ [[maybe_unused]] std::shared_ptr<detail::queue_impl> SecondaryQueue,
323
+ bool CallerNeedsEvent)
323
324
: impl(std::make_shared<detail::handler_impl>(std::move(PrimaryQueue),
324
- std::move (SecondaryQueue),
325
325
CallerNeedsEvent)),
326
326
MQueue (std::move(Queue)) {}
327
327
@@ -1908,30 +1908,27 @@ void handler::verifyDeviceHasProgressGuarantee(
1908
1908
}
1909
1909
1910
1910
bool handler::supportsUSMMemcpy2D () {
1911
- auto &QueueImpl = impl->MSubmissionPrimaryQueue ;
1912
- if (QueueImpl && !checkContextSupports (QueueImpl->getContextImplPtr (),
1913
- UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT))
1914
- return false ;
1915
-
1916
- return true ;
1911
+ assert (impl->MSubmissionPrimaryQueue &&
1912
+ " handler should not have a null primary queue." );
1913
+ return checkContextSupports (
1914
+ impl->MSubmissionPrimaryQueue ->getContextImplPtr (),
1915
+ UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT);
1917
1916
}
1918
1917
1919
1918
bool handler::supportsUSMFill2D () {
1920
- auto &QueueImpl = impl->MSubmissionPrimaryQueue ;
1921
- if (QueueImpl && !checkContextSupports (QueueImpl->getContextImplPtr (),
1922
- UR_CONTEXT_INFO_USM_FILL2D_SUPPORT))
1923
- return false ;
1924
-
1925
- return true ;
1919
+ assert (impl->MSubmissionPrimaryQueue &&
1920
+ " handler should not have a null primary queue." );
1921
+ return checkContextSupports (
1922
+ impl->MSubmissionPrimaryQueue ->getContextImplPtr (),
1923
+ UR_CONTEXT_INFO_USM_FILL2D_SUPPORT);
1926
1924
}
1927
1925
1928
1926
bool handler::supportsUSMMemset2D () {
1929
- auto &QueueImpl = impl->MSubmissionPrimaryQueue ;
1930
- if (QueueImpl && !checkContextSupports (QueueImpl->getContextImplPtr (),
1931
- UR_CONTEXT_INFO_USM_FILL2D_SUPPORT))
1932
- return false ;
1933
-
1934
- return true ;
1927
+ assert (impl->MSubmissionPrimaryQueue &&
1928
+ " handler should not have a null primary queue." );
1929
+ return checkContextSupports (
1930
+ impl->MSubmissionPrimaryQueue ->getContextImplPtr (),
1931
+ UR_CONTEXT_INFO_USM_FILL2D_SUPPORT);
1935
1932
}
1936
1933
1937
1934
id<2 > handler::computeFallbackKernelBounds (size_t Width, size_t Height) {
0 commit comments