|
jam 0.0.1
A compacting generational garbage collector for C++26
|
SIMD compressed pointers and heap-relative gathers. More...
#include <native/attributes.h>#include <native/targets.h>#include <array>#include <cassert>#include <bit>#include <concepts>#include <cstddef>#include <cstdint>#include <cstring>#include <span>#include <type_traits>#include <utility>import native;import jam:heap;Go to the source code of this file.
Classes | |
| struct | jam::tracer< native::simd< ptr< T >, N, A > > |
| Trace actual pointer lanes, including null fields, in register order. More... | |
| struct | jam::tracer< native::wide< V, K > > |
| Trace each register's fields in the enclosing allocation. More... | |
Functions | |
| template<class T, std::size_t N, native::isa<> A> | |
| void | jam::unsafe_assign (native::simd< ptr< T >, N, A > &target, native::simd< ptr< T >, N, A > const &source) noexcept |
| Copy SIMD pointer bits without registering old-to-young slots. | |
| template<class T, std::size_t N, native::isa<> A> | |
| void | jam::assign (native::simd< ptr< T >, N, A > &target, native::simd< ptr< T >, N, A > const &source) noexcept |
| Bulk-copy a register and register its old-to-young slots. | |
| template<class T, std::size_t N, native::isa<> A, std::size_t K> | |
| void | jam::unsafe_assign (native::wide< native::simd< ptr< T >, N, A >, K > &target, native::wide< native::simd< ptr< T >, N, A >, K > const &source) noexcept |
| Copy a pointer register pack without registration; caller owns its barriers. | |
| template<class T, std::size_t N, native::isa<> A, std::size_t K> | |
| void | jam::assign (native::wide< native::simd< ptr< T >, N, A >, K > &target, native::wide< native::simd< ptr< T >, N, A >, K > const &source) noexcept |
| Copy a pointer register pack with one bulk barrier per register. | |
| template<class T, class U, class Owner, std::size_t N, native::isa<> A> | |
| native::simd< U, N, A > | jam::gather (native::simd< ptr< T >, N, A > const &nodes, U Owner::*member, typename native::simd< ptr< T >, N, A >::mask_type active) noexcept |
| Gather a member from selected lanes; inactive lanes return zero or null. | |
| template<class T, class U, class Owner, std::size_t N, native::isa<> A> | |
| native::simd< U, N, A > | jam::gather (native::simd< ptr< T >, N, A > const &nodes, U Owner::*member) noexcept |
| Gather with the mask nodes != nullptr; inactive lanes return zero or null. | |
| template<class T, class U, class Owner, std::size_t N, native::isa<> A, std::size_t K> | |
| native::wide< native::simd< U, N, A >, K > | jam::gather (native::wide< native::simd< ptr< T >, N, A >, K > const &nodes, U Owner::*member, native::wide< typename native::simd< ptr< T >, N, A >::mask_type, K > const &active) noexcept |
| Gather each register using the supplied masks, preserving lane and register order. | |
| template<class T, class U, class Owner, std::size_t N, native::isa<> A, std::size_t K> | |
| native::wide< native::simd< U, N, A >, K > | jam::gather (native::wide< native::simd< ptr< T >, N, A >, K > const &nodes, U Owner::*member) noexcept |
| Compute all nonnull register masks, then gather the requested member. | |
SIMD compressed pointers and heap-relative gathers.
Definition in file simd.ccm.
|
exportnoexcept |
Gather with the mask nodes != nullptr; inactive lanes return zero or null.
Shares the explicit-mask overload's heap, member and result-shape requirements.
|
exportnoexcept |
Gather a member from selected lanes; inactive lanes return zero or null.
On x86, Clang's flat data-member-pointer ABI supplies the displacement: ptrdiff_t on Unix, int32_t on Windows. Extended MS representations are rejected. The offset is folded into the gather base; no sample object or mask extraction is needed to recover it. Pointer results outside the heap expire at collection.
|
exportnoexcept |
Compute all nonnull register masks, then gather the requested member.
Each register obeys the SIMD gather's requirements.
|
exportnoexcept |
Gather each register using the supplied masks, preserving lane and register order.
Each register obeys the SIMD gather's requirements.