Skip to content

Commit

Permalink
Work around thrust/memory.h circular include (#1634)
Browse files Browse the repository at this point in the history
* Work around thrust/memory.h circular include

Add `#include <thrust/detail/malloc_and_free_fwd.h>` to
`thrust/thrust/system/detail/generic/memory.inl` to work around a
circular include dependency that was resulting in errors about
`thrust::malloc` not being defined.  The errors were seen with both G++
and NVC++ when using the OpenMP back end.

* [pre-commit.ci] auto code formatting

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
dkolsen-pgi and pre-commit-ci[bot] authored Apr 16, 2024
1 parent f62616b commit 285cb15
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions thrust/thrust/system/detail/generic/memory.inl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# pragma system_header
#endif // no system header

#include <thrust/detail/malloc_and_free_fwd.h>
#include <thrust/detail/static_assert.h>
#include <thrust/detail/type_traits/pointer_traits.h>
#include <thrust/system/detail/adl/malloc_and_free.h>
Expand Down

0 comments on commit 285cb15

Please sign in to comment.