devkev / binmat Goto Github PK
View Code? Open in Web Editor NEWA C library for efficient handling of 2D binary matrices.
License: GNU General Public License v3.0
A C library for efficient handling of 2D binary matrices.
License: GNU General Public License v3.0
libbinmat.c is still full of old devel/debug code (mostly commented). Go through and clean/tidy it up.
It generates different output to binmat_print_matrix_slow()
, so it must be wrong.
binmat-test is nice, but it's not exactly a test suite. A test suite could be a simple shell script around multiple invocations of binmat-test, exercising several different matrix sizes and powers, or it could be something more sophisticated (eg. something alongside binmat-test, written in C for portability).
Currently BINMAT_PRINTF_MODIFIER
isn't set at all if binmat is built with BINMAT_DATA_TYPE
set. The easiest solution is to force people to also set BINMAT_PRINTF_MODIFIER
if they set BINMAT_DATA_TYPE
, even if it is set to nothing or an empty string.
As noted in the source:
// Depending on the size of the matrices involved, and the depth of
// pipelining on the arch we're running on (since conditional branching
// destroys pipelining gains), it may be faster to just XOR the entire
// matrices (with final masks) together, ORing against a "running result"
// as we go. The NOT of the running result is then the final result. So
// this way no conditionals or comparisons are required, and it amounts to
// just streaming through memory doing fast bitwise operations.
So, implement this (since it shouldn't be hard) and then run some benchmarks to see if it's worth keeping, and when.
It outputs lines of varying lengths, which can't be right.
The consts one
and zero
are very generic names, and risk causing namespace clashes with other software. Probably they should be renamed to binmat_one
and binmat_zero
respectively.
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.