Skip to content

Commit

Permalink
Address build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
miscco committed Apr 5, 2024
1 parent 44bf68b commit 2338e42
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@

#include <cuda/std/detail/__pragma_push>

_CCCL_NV_DIAG_SUPPRESS(1215)

_LIBCUDACXX_BEGIN_NAMESPACE_STD

#if _CCCL_STD_VER <= 2014
Expand Down Expand Up @@ -599,6 +601,8 @@ struct __asan_annotate_container_with_allocator<allocator<_Tp> > : true_type

_LIBCUDACXX_END_NAMESPACE_STD

_CCCL_NV_DIAG_DEFAULT(1215)

#include <cuda/std/detail/__pragma_pop>

#endif // _LIBCUDACXX___MEMORY_ALLOCATOR_TRAITS_H
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ class _LIBCUDACXX_TYPE_VIS bad_alloc : public exception
_LIBCUDACXX_NORETURN inline _LIBCUDACXX_INLINE_VISIBILITY void __throw_bad_alloc() {
#ifndef _LIBCUDACXX_NO_EXCEPTIONS
throw bad_alloc();
#endif // !_LIBCUDACXX_NO_EXCEPTIONS
#else
_CUDA_VSTD_NOVERSION::terminate();
#endif // !_LIBCUDACXX_NO_EXCEPTIONS
}

class _LIBCUDACXX_TYPE_VIS bad_array_new_length : public bad_alloc
Expand Down
10 changes: 5 additions & 5 deletions libcudacxx/include/cuda/stream_ref
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private:
#endif // no system header

#include <cuda/std/cstddef>
#include <cuda/std/detail/libcxx/include/cstdlib>
#include <cuda/std/detail/libcxx/include/__exception/terminate.h>

_LIBCUDACXX_BEGIN_NAMESPACE_CUDA

Expand Down Expand Up @@ -148,7 +148,7 @@ public:
#ifndef _LIBCUDACXX_NO_EXCEPTIONS
throw cuda::cuda_error{__result, "Failed to synchronize stream."};
#else
_LIBCUDACXX_UNREACHABLE();
_CUDA_VSTD_NOVERSION::terminate();
#endif
}
}
Expand All @@ -166,18 +166,18 @@ public:
switch (__result)
{
case ::cudaSuccess:
return true;
break;
case ::cudaErrorNotReady:
return false;
default:
::cudaGetLastError(); // Clear CUDA error state
#ifndef _LIBCUDACXX_NO_EXCEPTIONS
throw cuda::cuda_error{__result, ""};
#else
// _LIBCUDACXX_UNREACHABLE();
_CUDA_VSTD_NOVERSION::terminate();
#endif
return false;
}
return true;
}
};

Expand Down

0 comments on commit 2338e42

Please sign in to comment.