Skip to content

Commit 008664b

Browse files
mlxdgithub-actions[bot]chaeyeunpark
authored
Update aligned allocator definition for C++20 compiler supports (#438)
* Add potentially missing definitions to allocator * Resinstate brew installed clang builder tests * Update CI alloc name * Auto update version * Update setup * Update * Auto update version * Auto update version * Trigger CI * Remove extraneous CI file * Remove optional allocator types * Auto update version * Trigger CI * Update changelog --------- Co-authored-by: Dev version update bot <github-actions[bot]@users.noreply.github.com> Co-authored-by: Chae-Yeun Park <[email protected]>
1 parent 8c6657e commit 008664b

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

.github/CHANGELOG.md

+5-2
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919

2020
### Bug fixes
2121

22+
* Ensure aligned allocator definition works with C++20 compilers.
23+
[(#438)](https://github.com/PennyLaneAI/pennylane-lightning/pull/438)
24+
2225
* Prevent multiple threads from calling `Kokkos::initialize` or `Kokkos::finalize`.
23-
[(#439)] (https://github.com/PennyLaneAI/pennylane-lightning/pull/439)
26+
[(#439)](https://github.com/PennyLaneAI/pennylane-lightning/pull/439)
2427

2528
### Contributors
2629

2730
This release contains contributions from (in alphabetical order):
2831

29-
Lee J. O'Riordan
32+
Lee J. O'Riordan, Chae-Yeun Park
3033

3134
---
3235

pennylane_lightning/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
"""
1818

1919

20-
__version__ = "0.31.0-dev3"
20+
__version__ = "0.31.0-dev4"

pennylane_lightning/src/simulator/Observables.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ template <class T> struct HamiltonianApplyInPlace<T, true> {
312312
const std::vector<std::shared_ptr<Observable<T>>> &terms,
313313
StateVectorManagedCPU<T> &sv) {
314314
const size_t length = sv.getLength();
315-
const auto allocator = sv.allocator();
315+
auto allocator = sv.allocator();
316316

317317
std::vector<std::complex<T>, decltype(allocator)> sum(
318318
length, std::complex<T>{}, allocator);

pennylane_lightning/src/util/Memory.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ template <class T> class AlignedAllocator {
100100
*/
101101
[[nodiscard]] inline uint32_t alignment() const { return alignment_; }
102102

103-
template <class U> struct rebind { using other = AlignedAllocator<U>; };
104-
105103
template <typename U>
106104
explicit constexpr AlignedAllocator(
107105
[[maybe_unused]] const AlignedAllocator<U> &rhs) noexcept

0 commit comments

Comments
 (0)