pcclark4 / cggml Goto Github PK
View Code? Open in Web Editor NEWA general algorithms library written in ANSI C.
A general algorithms library written in ANSI C.
Not everything should be in the top-level src/ directory, obviously. Sorting is a completely different realm than geometry or graph operations for example.
https://en.wikipedia.org/wiki/Cycle_sort
https://rosettacode.org/wiki/Sorting_algorithms/Cycle_sort#C
Keep in mind the "swap" that happens isn't an in-place swap within the list. It's a swap with a tmp variable, and this is required for the algorithm to work. This is why we need the caller to pass us a pointer to store the tmp value in. Otherwise we could just do a simple byte-wise swap.
LSD radix sort is do-able on embedded platforms because it is recursion-free, unlike MSD radix sort.
Using keygen_func like the generic counting sort.
This reduces the number of outer loop iterations from 32 to 4, with only mild space increase. This should give a good speedup in performance. However, I wonder if the extra 253 bytes of storage needed could be detrimental to embedded support? Maybe we need a flag or an overload for the other strategy instead?
Big if true. Let's call it phalloc
On non-embedded systems it can simply proxy to malloc
, calloc
or alloca
This requires splitting the input array into negative and nonnegative numbers, sorting them independently, and then merging it back together at the end.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.