Skip to content

Commit e553155

Browse files
authored
turn off execution space checks for unique_ptr (#4732)
1 parent 3694fe7 commit e553155

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

libcudacxx/include/cuda/std/__memory/unique_ptr.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT default_delete
6868
default_delete(const default_delete<_Up>&, enable_if_t<_CCCL_TRAIT(is_convertible, _Up*, _Tp*), int> = 0) noexcept
6969
{}
7070

71+
_CCCL_EXEC_CHECK_DISABLE
7172
_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 void operator()(_Tp* __ptr) const noexcept
7273
{
7374
static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
@@ -86,6 +87,7 @@ struct _CCCL_TYPE_VISIBILITY_DEFAULT default_delete<_Tp[]>
8687
const default_delete<_Up[]>&, enable_if_t<_CCCL_TRAIT(is_convertible, _Up (*)[], _Tp (*)[]), int> = 0) noexcept
8788
{}
8889

90+
_CCCL_EXEC_CHECK_DISABLE
8991
template <class _Up>
9092
_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 enable_if_t<_CCCL_TRAIT(is_convertible, _Up (*)[], _Tp (*)[]), void>
9193
operator()(_Up* __ptr) const noexcept
@@ -704,12 +706,14 @@ struct __unique_if<_Tp[_Np]>
704706
typedef void __unique_array_known_bound;
705707
};
706708

709+
_CCCL_EXEC_CHECK_DISABLE
707710
template <class _Tp, class... _Args>
708711
_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 typename __unique_if<_Tp>::__unique_single make_unique(_Args&&... __args)
709712
{
710713
return unique_ptr<_Tp>(new _Tp(_CUDA_VSTD::forward<_Args>(__args)...));
711714
}
712715

716+
_CCCL_EXEC_CHECK_DISABLE
713717
template <class _Tp>
714718
_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 typename __unique_if<_Tp>::__unique_array_unknown_bound
715719
make_unique(size_t __n)
@@ -721,12 +725,14 @@ make_unique(size_t __n)
721725
template <class _Tp, class... _Args>
722726
_LIBCUDACXX_HIDE_FROM_ABI typename __unique_if<_Tp>::__unique_array_known_bound make_unique(_Args&&...) = delete;
723727

728+
_CCCL_EXEC_CHECK_DISABLE
724729
template <class _Tp>
725730
_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 typename __unique_if<_Tp>::__unique_single make_unique_for_overwrite()
726731
{
727732
return unique_ptr<_Tp>(new _Tp);
728733
}
729734

735+
_CCCL_EXEC_CHECK_DISABLE
730736
template <class _Tp>
731737
_LIBCUDACXX_HIDE_FROM_ABI _CCCL_CONSTEXPR_CXX20 typename __unique_if<_Tp>::__unique_array_unknown_bound
732738
make_unique_for_overwrite(size_t __n)

0 commit comments

Comments
 (0)