-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around issues with Mingw64 having a tiny stack.
The updates to hist1_4 and hist8 use large local buffers. This fails on mingw64 unless e.g. -Wl,--stack,4000000 is used. The alternative is the same strategy employed in rANS elsewhere of using pthread_once to allocate the local memory as a global pointer, once per thread in use. If threads aren't available it reverts to a traditional malloc/free cycle. (This was benchmarked and it's generally still better for large blocks than the older 8-bit frequency counting methods.)
- Loading branch information
1 parent
c5f50a1
commit 7b398b4
Showing
1 changed file
with
66 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters