Skip to content

Commit

Permalink
Merge pull request #180 from illuhad/hotfix/remove-adaptivecpp-stdpar…
Browse files Browse the repository at this point in the history
…-workaround
  • Loading branch information
tomdeakin authored Jan 8, 2024
2 parents 15fb08b + e5ad001 commit 1665a36
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@
All notable changes to this project will be documented in this file.

## [Unreleased]

### Removed
- Remove support for ComputeCpp compiler

### Changed
- Removed std-data/std-indices memory management workaround for AdaptiveCpp


## [v5.0] - 2023-10-12
### Added
- Ability to build Kokkos and RAJA versions against existing packages.
Expand Down
11 changes: 0 additions & 11 deletions src/dpl_shim.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,10 @@ static constexpr auto exe_policy = std::execution::par_unseq;

#ifdef USE_STD_PTR_ALLOC_DEALLOC

#if defined(__HIPSYCL__) || defined(__OPENSYCL__)
#include <CL/sycl.hpp>

// TODO We temporarily use malloc_shared/free here for hipSYCL stdpar because there's a linking issue if we let it hijack new/delete
// for this to work, we compile with --hipsycl-stdpar-system-usm so that hijacking is disabled
static cl::sycl::queue queue{cl::sycl::default_selector_v};
template <typename T> T *alloc_raw(size_t size) { return cl::sycl::malloc_shared<T>(size, queue); }
template <typename T> void dealloc_raw(T *ptr) { cl::sycl::free(ptr, queue); }

#else
template<typename T>
T *alloc_raw(size_t size) { return (T *) aligned_alloc(ALIGNMENT, sizeof(T) * size); }

template<typename T>
void dealloc_raw(T *ptr) { free(ptr); }
#endif

#endif

0 comments on commit 1665a36

Please sign in to comment.