diff options
author | Benda Xu <heroxbd@gentoo.org> | 2021-01-21 19:36:45 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2021-01-24 15:45:41 +0800 |
commit | 21458c9061094f1fa0a47c93c1416c31bc6dc7de (patch) | |
tree | 49f630a59daa15e0a656cda0b0d27f3c66143bb9 /sci-libs/rocThrust/files | |
parent | sci-libs/rocPRIM: HIP parallel primitives for ROCm GPU. (diff) | |
download | gentoo-21458c9061094f1fa0a47c93c1416c31bc6dc7de.tar.gz gentoo-21458c9061094f1fa0a47c93c1416c31bc6dc7de.tar.bz2 gentoo-21458c9061094f1fa0a47c93c1416c31bc6dc7de.zip |
sci-libs/rocThrust: ROCm backend for Thrust.
Bug: https://bugs.gentoo.org/650804
Bug: https://github.com/gentoo/gentoo/pull/10724
Suggested-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Suggested-by: Wilfried Holzke <gentoo@holzke.net>
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sci-libs/rocThrust/files')
-rw-r--r-- | sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch b/sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch new file mode 100644 index 000000000000..2b78fd0053ed --- /dev/null +++ b/sci-libs/rocThrust/files/rocThrust-4.0-operator_new.patch @@ -0,0 +1,29 @@ +# Use copy assignment instead of copy constructor to avoid unavailability of placement new operator. +# But more likely there is another hidden bug, since this syntax is actually correct. +# There are still similar syntax remain in other headers, which may cause identical compilation error. + +# Suggested by Yuyi Wang <strawberry_str@hotmail.com> +diff --color -uprN rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_copy.h rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_copy.h +--- rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_copy.h 2021-01-21 20:42:44.439246148 +0800 ++++ rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_copy.h 2021-01-21 21:13:20.926840762 +0800 +@@ -62,7 +62,7 @@ namespace __uninitialized_copy + InputType const& in = raw_reference_cast(input[idx]); + OutputType& out = raw_reference_cast(output[idx]); + +- ::new(static_cast<void*>(&out)) OutputType(in); ++ out = in; + } + }; // struct functor + +diff --color -uprN rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_fill.h rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_fill.h +--- rocThrust-rocm-4.0.0.orig/thrust/system/hip/detail/uninitialized_fill.h 2021-01-21 20:42:44.439246148 +0800 ++++ rocThrust-rocm-4.0.0/thrust/system/hip/detail/uninitialized_fill.h 2021-01-21 21:13:07.022489406 +0800 +@@ -59,7 +59,7 @@ namespace __uninitialized_fill + { + value_type& out = raw_reference_cast(items[idx]); + +- ::new(static_cast<void*>(&out)) value_type(value); ++ out = value; + } + }; // struct functor + } // namespace __uninitialized_copy |