jharwell / rcsw Goto Github PK
View Code? Open in Web Editor NEWCollection of reusable C software.
License: MIT License
Collection of reusable C software.
License: MIT License
This did not bite me until now, but of course defining __unused and similar
macros when anything starting with a double underscore is reserved for the
compiler results in a program with undefined behavior. Sigh.
It should only build if WITH_TESTS=yes is passed to cmake.
explicitly mark which functions should be used outside the library and which shouldn't, and then get the compiler to enforce it
Somehow not passing--this should be fixed.
Sometimes you might want application-domain memory to be zeroed by RCSW as if it came from calloc(), and sometimes not, for performance reasons. This should be (a) a cmake configure which sets the default for all data structures, and (b) a flag which can be passed to each individual data structure to override the default behavior if there is a conflict.
Fix the issues that coverity analysis found
For a lot of the modules in rcsw, they take uint8_t* for generic data for
compatibility with SPARC (and maybe other architectures), for maximum
robustness, at the expense of having to cast everywhere. Consider adding an
cmake option+type in types.h to switch between uint8_t* and void* to make this
less painful where it can be.
Needs to have plug-n-play ability, where you can select from a set of macro
implementation options, or define your own
Need to update to be more readable/usable in RCPPSW
Should be attached to function decls, not definitions, to be more useful outside of LTO.
I think the implementation is mostly done, though the unit tests need some
serious updates, iirc.
Some ideas:
To get better "logical" code coverage and testing of DS features:
All relevant flags for each data structure should be tested individually
(current behavior) as well in all possible permutations (needs to be added)
Data structures need to be tested with elements which are 1,2,3,4 bytes; this
can be done pretty easily with C++ templates, operator==(), etc for simple
element classes in the tests.
For key-based data structures, test with increasing, decreasing, and random
values, for data/keys for maximum fidelity.
Right now its usage is very sporadic; need to make consistent and in line with
unix conventions
Now that I've updated the libra directory structure, rcsw needs to be updated as well.
I should define in the rst docs a table that each data structure more or less
follows for its API. E.g., XX_init()
, XX_destroy()
, etc.
Basically add function pointers to all DS handles allowing you to do
handle->op(handle) instead of having to call the C api (e.g., da->sort(da)
instead of darray_sort()).
Should be a configuration option, since this API will have a slightly higher
runtime cost in space.
I haven't done this since I left SwRI, so I'm sure it won't work out of the box.
Also would be good to verify build on OSX.
I left it in a partially complete state a while ago. It has some unit tests that
pass--no idea if they actually test anything useful.
The more complex data structure that allows graphs to dynamically change their
edges after initialization.
Need to document for each module (maybe in .h, but probably in .rst) what common
flags/flags in general are accepted, and what they mean/do.
Don't use -fPIC when compiling for baremetal targets: it causes issues with
access global variables in raw .bin images. Sometimes.
Due to recent changes to beable to build on MSI, isnan() is no longer define
when compiling C .h files with C++ source, due to my removal of my dirty hack
A FIFO which can be viewed at multiple granularities.
One consumer could pull things out in 2 byte chunks, another at 6 byte chunks,
etc.
Now that the uniform-ish API is documented, the implementation could probably be
made a little more uniform in some small ways (e.g., XX_isfull() is present for
all data structures).
Now that the cmake-config repo is more stable, update the
documentation in this repo to reflect that.
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.