Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions libcudacxx/include/cuda/__mdspan/host_device_accessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,10 @@ class __host_accessor : public _Accessor
_CCCL_API constexpr reference access(data_handle_type __p, ::cuda::std::size_t __i) const
noexcept(__is_access_noexcept)
{
NV_IF_TARGET(NV_IS_DEVICE, (_CCCL_VERIFY(false, "cuda::__host_accessor cannot be used in DEVICE code");))
_CCCL_IF_NOT_CONSTEVAL_DEFAULT
{
NV_IF_TARGET(NV_IS_DEVICE, (_CCCL_VERIFY(false, "cuda::__host_accessor cannot be used in DEVICE code");))
}
return _Accessor::access(__p, __i);
}

Expand All @@ -217,7 +220,7 @@ class __host_accessor : public _Accessor
_CCCL_ASSERT(__is_valid, "host_accessor (mdspan): data handle doesn't point to a valid host memory");
return !__is_valid;
}
return true;
return false;
}
#endif // !defined(_CCCL_DISABLE_MDSPAN_ACCESSOR_DETECT_INVALIDITY)
};
Expand Down Expand Up @@ -352,7 +355,7 @@ class __device_accessor : public _Accessor
"device_accessor (mdspan): data handle doesn't point to a valid device or managed memory");
return !__is_valid;
}
return true;
return false;
}
#endif // !defined(_CCCL_DISABLE_MDSPAN_ACCESSOR_DETECT_INVALIDITY)
};
Expand Down Expand Up @@ -472,7 +475,7 @@ class __managed_accessor : public _Accessor
_CCCL_ASSERT(__is_valid, "managed_accessor (mdspan): data handle doesn't point to a valid managed memory");
return !__is_valid;
}
return true;
return false;
}
#endif // !defined(_CCCL_DISABLE_MDSPAN_ACCESSOR_DETECT_INVALIDITY)
};
Expand Down
Loading