1
0
forked from Alepha/Alepha
Commit Graph

395 Commits

Author SHA1 Message Date
2a6fa250ad Remove the overload< __LINE__ > hack. 2025-11-04 11:22:12 -10:00
0cdb799ac3 Merge branch 'master' into concepts-in-comparisons
* master:
  Modernize (partially) the comparisons header's module namespaces.
  Allow for setting of delimiters.
  Match `noexcept` on `cbegin`/`cend` deletions to std.
  Fixup an example in comments on options.

 Conflicts:
	comparisons.h
2025-11-04 10:41:25 -10:00
f88efc122f Modernize (partially) the comparisons header's module namespaces. 2025-11-04 10:19:17 -10:00
a9d4aabf02 Allow for setting of delimiters. 2025-10-03 20:38:13 -04:00
33deefcbf8 Match noexcept on cbegin/cend deletions to std.
This silences some warnings for standard libraries where these
functions are `noexcept`.
2025-10-03 12:02:32 -04:00
9709f14749 Convert comparisons more towards the modern namespace form. 2025-08-28 00:34:55 -04:00
8889e7bcb0 Template overload hack not needed anymore. 2025-08-28 00:33:17 -04:00
cb3079ca9e Conceptualize free strict_weak_order_lens. 2025-08-28 00:31:18 -04:00
0ba1ea988a Conceptualize member strict_weak_order_lens. 2025-08-28 00:26:54 -04:00
9987e962a3 Conceptualize free spaceship_lens. 2025-08-28 00:24:41 -04:00
bd1de0bba4 Conceptualize member spaceship lens. 2025-08-28 00:21:41 -04:00
a2f83abeb6 Rename the core concept in comparison helpers. 2025-08-28 00:17:43 -04:00
9b42ad06de Conceptualize value_lens member support. 2025-08-28 00:14:35 -04:00
5dd58a1a06 More concepts to drive comparisons. 2025-08-28 00:03:25 -04:00
970c65c7ea Partially adopt the more "modern" module namespace format. 2025-08-27 23:54:45 -04:00
2202d68ad0 Remove more enable_if_t for comparisions. 2025-08-27 23:51:58 -04:00
4116db0103 Fixup an example in comments on options. 2025-08-27 23:36:20 -04:00
15ab3f776e Start by making Comparable a concept. 2025-08-27 17:27:58 -04:00
084ee3744f I think gitea likes the license file to live in LICENSE 2025-08-14 16:22:42 -04:00
096c4145e6 Reorganize the license files to avoid confusing gitea. 2025-08-14 16:21:51 -04:00
98b3f414d4 comment explaining the reason for use of Taus88 2025-01-27 16:09:10 -05:00
d008e456c8 Blob based per-thread slab allocator
Uses a fast random generator to decide when to split Blobs.

Closes: #31
2025-01-27 13:23:18 -05:00
8ccd3d0da0 Switch the dead drop to use a circular buffer.
Closes: #16
2025-01-20 14:15:29 -05:00
489f6a097e Merge branch 'master' into slab-allocator
* master:
  Add list size primitive to type lisp.
2024-09-19 00:36:56 -04:00
f4c2e1e044 Add list size primitive to type lisp. 2024-09-19 00:35:59 -04:00
54edf41d96 Fix building of Memory/Buffer.h 2024-09-06 18:09:54 -04:00
5efc8b79f0 Updated thread slab with overflow protection and rewritten. 2024-09-06 17:06:08 -04:00
9717ae49a4 Use fast random to decide when to split Blobs. 2024-09-05 18:48:07 -04:00
3bd236b556 Add fast random facility.
This is a low-memory-overhead and low-cpu-overhead (per generated
bit) random number generator.  The repeat cycle is around 2**88.
Which means around 2**120 bits are available before a cycle.  Which
means that about 2**102 12-bit samples are available before repeats.

This should be more than sufficient for blob rollover purposes.
If 100 million blobs are split per second (absurdly high), then
that's about 2**27 per second.  If run for 30 years, that's
2**30 seconds.  If run across 128 CPUs, that's 2**7 CPUs.  Thus
2**(27+30+7) total samples are required before loop.  This is
2**64 which is WAAAY less than 2**88.  (And this is overly
conservative, as these generators should be one-per-thread...
so we're really much closer to 2**57, not that it matters.)

For this reason, there's no reseed code.  The cycle length of
mt11213b is significantly longer, however, it has a significantly
larger state.  One goal here is to keep the amount of state for
this generator to a single cache line.  As such, if the cycle
length is later shown to be significantly smaller than 2**48
or so, a reseed code path may need to be added.  (This is on
the assumption that the above described intensive run would
run for more than 1 million seconds, or about two weeks.)
2024-09-05 18:44:39 -04:00
6c165b1603 Blob based per-thread slab allocator
This permits "stateless" allocators which grab memory from a
`thread_local Alepha::Blob` instance.  Each allocation
sticks a malloc cookie of type
`std::shared_ptr< Alepha::Blob::StorageReservation >`
just before the base of the allocation.

The allocator object knows that it needs to `reinterpret_cast`
the malloc cookie into a shared pointer and run its destructor.
This causes the Blob's underlying reference counted allocation
to be tied to the lifetime of the allocated memory.  The intent
is to permit cheap allocation in one thread and deallocation
in another.  Each deallocation should be a single atomic
dereference operation.  Each allocation should be (usually) a
bit of pointer arithmetic and a single atomic increment operation.

This, hopefully, eliminates significant thread contention for
the global allocation mechanism between various threads in
an intensive multithreaded situation where each processing
thread thread may independently retire data objects allocated by
a single source.
2024-09-05 18:35:07 -04:00
d4dfe9f90f Major Enum type enhancements
`UnifiedEnum` -- union construction of enumerates

Access the enumerates as constexpr string array

Negation support for binary `Enum`
2024-08-12 16:50:14 -04:00
1c80d27cf3 Add strip_last_t to type lisp. 2024-08-09 03:31:34 -04:00
2d26e70f6b Minor doc spelling fix. 2024-08-08 21:48:32 -04:00
abca951604 Add line-comment filter for streambuf. 2024-08-08 21:35:46 -04:00
da0a737f29 Fix an improperly named module namespace. 2024-08-08 17:21:13 -04:00
322bf65400 Invariant gadget. 2024-08-08 17:19:05 -04:00
307175b616 Fix bug in number printing. 2024-08-08 17:14:08 -04:00
0737afc002 Add line-comment filter for streambuf. 2024-08-08 17:12:33 -04:00
9eaf05c36c Report a handle for ThreadGroup insertions 2024-08-08 04:16:02 -04:00
e232388bdc Permit tuning CPU usage in build from env var 2024-08-02 23:14:47 -04:00
97050bf5f1 Dangit! Forgot the test. 2024-07-29 15:51:50 -04:00
c5d1079deb Flesh out the weight computation for Dropbox 2024-07-25 22:11:23 -04:00
2ee3aba462 Add NamedOperator and NamedComparator.
This permits naming operators via an enhanced enum and then
looking them up.  This is a useful component for quick
development of scripting language functionalities.
2024-07-17 11:45:50 -04:00
308b64fc64 UnifiedEnum -- union construction of enumerates 2024-07-13 16:38:06 -04:00
3c814a53c3 Access the enumerates as constexpr string array 2024-07-13 16:37:25 -04:00
ad053e9175 Negation support for binary Enum 2024-07-13 05:32:57 -04:00
db1b0edff3 Add named comparator support. 2024-07-12 14:55:03 -04:00
0e970762e4 Fix whitespace error. 2024-07-12 14:47:45 -04:00
6a89b18c11 Create C++26(?) emulation of template for
C++26 (I hope) is supposed to have this syntax:

```
template for( const auto &element: aggregate )
{
        ...;
}
```

Thus, I've adjusted this gadget to have a similar name, to enable
simple mechanical code changes.  From Alepha, you'd use it
thus:

```
template_for( aggregate ) <=[&]( const auto &element )
{
        ...;
};
```
2024-07-12 14:35:52 -04:00
a90a1a776e Add a NamedOperator facility to Alepha.
This permits naming operators via an enhanced enum and then
looking them up.  This is a useful component for quick
scripting language functionalities.
2024-07-10 20:28:51 -04:00