msbrogli / sdm-framework Goto Github PK
View Code? Open in Web Editor NEWA Sparse Distributed Memory Framework.
Home Page: http://sdm-framework.readthedocs.io/
License: GNU General Public License v2.0
A Sparse Distributed Memory Framework.
Home Page: http://sdm-framework.readthedocs.io/
License: GNU General Public License v2.0
It would be interesting to prove that it is necessary to scan all hard locations, which is what justifies the code.
If x is a bitstring and HL is the set of hard locations, there can be no algorithm A that scans less than HL hard locations to find all that are active.
Maybe a proof by absurdity?
Here is a weak form of the theorem:
Suppose a set HL U {x} of |HL|+1 hard locations. That is, x actually belongs to this extended set and is itself a Hard Location. Because a scanning of HL alone would not find x, it is necessary to scan |HL| + 1 locations.
Now, a strong form of the theorem would show that any structure or algorithm is impossible.
[No speedup theorem]. There can be no algorithm, no matter which structure it uses, that avoids scanning a hard location p without breaking the assumption of randomness in the data.
AL$ ./test1
Dimension: 256
Number of hardlocations: 1000000
Allocated memory for addresses: 30.5 MB
Allocated bits per bitstring: 256
Remaining bits per bitstring: 0
Memory efficiency: 100.0%
bs1 = 960856d47a366b8ea73355070440c184efdec8b1c58981e7264a966ed770a674
@@ Linear 1055
@@ Thread 1055
@@ Linear2 1055
@@ Thread2 1055
OpenCL platforms: 1 devices: 1
OpenCL Max compute units=48 Default kernel=single_scan5_unroll Local worksize=4 Global worksize=50304
@@ OpenCL2 1055
Dimension: 1000
Number of hardlocations: 1000000
Allocated memory for addresses: 122.1 MB
Allocated bits per bitstring: 1024
Remaining bits per bitstring: 24
Memory efficiency: 97.7%
bs1 = 6f73b58020731efdc43d1131b1d62afe51e948c2ab1faeb2da1959bcb75d9684adff69a28942eb4ad7b96c1ffcc8b15f6a7b2d491acb48b16b86d1fb278da7a12f0f0a7642216a11caddbacf608461e72baa388a03d12cf5a1788e8fb1935fa12a7ca2ff7992a5e3f6363c0a80426b745afa551aec8d82e6d9525ce1a0000000
@@ Linear 1043
@@ Thread 1043
@@ Linear2 1043
@@ Thread2 1043
OpenCL platforms: 1 devices: 1
OpenCL Max compute units=48 Default kernel=single_scan5_unroll Local worksize=16 Global worksize=50688
@@ OpenCL2 1043
Dimension: 10000
Number of hardlocations: 1000000
Allocated memory for addresses: 1197.8 MB
Allocated bits per bitstring: 10048
Remaining bits per bitstring: 48
Memory efficiency: 99.5%
bs1 = 514ab04b32fdbcab026c43d089d4dc591a5a79b3131b76c8166fcd0e9d1cf48cdfb5e346019c2b390d9c81baaee383e69fe07c69959317912f288e85be64d673556d5bfd4cb83b696bd5e81460aa8bd6117ac7c30abbfbb70a80f15e91bb39fca4b97932ad78dc4f959ad6903709349c45515149814dfd8448b1eab49c12970e19f7f28b783c4542f8083b2c6c4a86bdf95c3c5092940f4272187ccbf77e030a68c39e629e1d39f6a7663b68a9ee24ae9b368c3c0219c0d3071438fc522ab8e89ba3076b71747899c048ddbc47bcb135e5597286267c887a6c4954f727c3a95fd4c35b6500e7f2e8dc4f5edb33f9727ccebfffa205f3b40cbdfb5ea03d6baa66c6eca7d00f9f42d1a4a96e5e8412576c1a8403442779e5e8ff33c828089b19e861a641790dbcdf0d2f2f5f61b209b09df4161d55227c1977e74743c018c08d4ecf2dab1016b18fdd0b76694b4ee0b49e01b9004ec4ea904860b8c81cce1de439d6569c3c45661b24ba1997b3b5345c9522e8508e81a5eed9ffe9133a3275117bd6f6f1d7cce2a6b1c05f21faf1cda8bc479ce891982a9c17cf35a367c63386a32e527ace3447ef16edb8d29a087d704b1271791c2481259ed0e8baac372ead52f35aeabe1b8209276ddf4753be740dbfa3e3dc0da187b02b295160dc903cd296ea2971d1e285dc12aadac66fe9c13620997aa274a52246f1e6aaaa6f1eab408263b7d745cd4211ef10277ddebdcd9cf18b7a9dcfc727617505c760118ddd08fac8721cbb57d2078bdea01751e443cb102c1f23ce813471c6f1c803e3b92c513919aff39067f66ac0375685fa7b14b3fd2c10b6a75e063b6f60f43d99b4b1f48851c71fbcafd82c280e15c504ab7ef77d8e3d70bbbf4e765969a8bf2e0c563f65b67115e14967deee9f79a785b74438631dca9479329efdb88e71b146c7e135c984fe73497c837026fa4a8b89e0e32e3732d9fe230af447c07a864cba0aa7367a94c09876a822c10c55c58178d4ecb5c9c289dcbbe725b038e788608be8f3329595dc89bce94835fc57e123da408f41e03a8ed71bff6e0b6b346ff50b2306ff0b0bfcc8b488934c347e0df4c6b6115294d2652f08b33b219eaa9fb67115c658b7f25750f6812f718e8cb9fd2e59bede796f4485604527390dca21a18345fa8ad2c97ed2393eb4fbd2a3f2db12e1e93048c13d4e8f2fe6324bf0a14a4c5ec0d321c4ea42cebd8c43983a8472b22baa965a77586be2d398ad26f0e787716d82462555d41d74dd5288fa8d25d38d9494e9ee70f2989af0efeec778409b258d5ebd143c9a0383caf59762788ee6cd168cb7b88096257699588a38b16d1259e7fc4118f0623f1fcc0fbb616c0a721082608669c247bb6ab29643146b470cbad37539db837a50c28f852950407ffb15e308bff6dd74b44f97c4dfdfd059a56fb4a5d153ddaa0c8fa206f2bd74b1fff000e05f7f94c767f9260d156988dc9e60717d5375c22b8b96f3e366978ddb1c3e57131fa7c53ec5dd7e619fc1eda55e068747d40b109adb8f1a80d6a0ba8c6fcd3a14d1771d8932489acd0d1499adfa6b49782c448a3ece5e2d93fe47adc0ab600c1b1286229fdad89c6edc641e7ec5a7818b1b718cd5cf23f96fb7b72405023dbc179908f511de8b272be9fe7e0a3c1fef6801d96aabe37c24ffc738821e53f68d6ad2c7784b169caf86f3016da07c2faa159aa36d41accf1eaa8bff9393afe8026fd0dc13f051f9072b492ab99851d7ac5cb6bf45b8000000000000
@@ Linear 984
@@ Thread 984
@@ Linear2 984
@@ Thread2 984
OpenCL platforms: 1 devices: 1
OpenCL Max compute units=48 Default kernel=single_scan5_unroll Local worksize=256 Global worksize=73728
Assertion failed: (error == CL_SUCCESS), function as_scanner_opencl_init, file scanner_opencl.c, line 184.
Abort trap: 6
It must check whether either OpenCL or pthreads are available.
Here's an idea for the future: what if we created [the beggining of] an open textbook for SDM? Something that could teach novices both about the framework and about the theory, and had multiple graphs that Kanerva generated, now done through code.
Since all papers published on Open Access Journals already are Creative-Commons, it would be a matter of copying and pasting (and citing/accrediting) those papers that already are open. That could speed things up and bring quality to a higher-level, if the papers and results turn out to be interesting.
At any rate, as I look for cool things to do it the future, this is definitely one that I'll consider.
al@nvidia ~ $ pip install sdm
Collecting sdm
Using cached https://files.pythonhosted.org/packages/de/ad/1e274ab5bc498a2eee3fd7389f1a3f4c9b058b18036590b763db14694880/sdm-1.6.0.tar.gz
Requirement already satisfied: future in ./anaconda2/lib/python2.7/site-packages (from sdm) (0.16.0)
Building wheels for collected packages: sdm
Running setup.py bdist_wheel for sdm ... error
Complete output from command /home/al/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-Ep2WfM/sdm/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" bdist_wheel -d /tmp/pip-wheel-3kxlYi --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/sdm
copying sdm/init.py -> build/lib.linux-x86_64-2.7/sdm
copying sdm/utils.py -> build/lib.linux-x86_64-2.7/sdm
copying sdm/scanner_opencl.cl -> build/lib.linux-x86_64-2.7/sdm
copying sdm/scanner_opencl2.cl -> build/lib.linux-x86_64-2.7/sdm
running build_ext
building 'sdm._libsdm' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lib
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/bitstring.c -o build/temp.linux-x86_64-2.7/src/bitstring.o
src/bitstring.c: In function ‘bs_init_random’:
src/bitstring.c:80:2: warning: implicit declaration of function ‘arc4random_buf’ [-Wimplicit-function-declaration]
arc4random_buf(bs, sizeof(bitstring_t) * len);
^
src/bitstring.c: In function ‘bs_init_hex’:
src/bitstring.c:91:15: warning: format ‘%llx’ expects argument of type ‘long long unsigned int *’, but argument 3 has type ‘bitstring_t * {aka long unsigned int *}’ [-Wformat=]
sscanf(hex, "%016llx", bs);
^
src/bitstring.c: In function ‘bs_to_hex’:
src/bitstring.c:116:16: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘bitstring_t {aka long unsigned int}’ [-Wformat=]
sprintf(buf, "%016llx", *bs);
^
src/bitstring.c: In function ‘bs_average’:
src/bitstring.c:166:9: warning: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration]
if (arc4random() % 2) {
^
src/bitstring.c: In function ‘bs_flip_random_bits’:
src/bitstring.c:259:7: warning: implicit declaration of function ‘arc4random_uniform’ [-Wimplicit-function-declaration]
j = arc4random_uniform(i+1);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/address_space.c -o build/temp.linux-x86_64-2.7/src/address_space.o
In file included from src/address_space.c:9:0:
src/utils.h:5:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int is_little_endian() {
^
In file included from src/address_space.c:7:0:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/address_space.c: In function ‘as_init_from_b64_file’:
src/address_space.c:175:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, sizeof(line), fp);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/counter.c -o build/temp.linux-x86_64-2.7/src/counter.o
In file included from src/counter.c:12:0:
src/utils.h:5:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int is_little_endian() {
^
src/counter.c: In function ‘counter_to_bitstring’:
src/counter.c:319:22: warning: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration]
bs_set_bit(bs, i, arc4random() % 2);
^
In file included from src/counter.c:10:0:
src/counter.c: At top level:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/counter.c: In function ‘counter_check_meta_file’:
src/counter.c:107:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, sizeof(line), fp);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_thread.c -o build/temp.linux-x86_64-2.7/src/scanner_thread.o
In file included from src/scanner_thread.c:5:0:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_opencl.c -o build/temp.linux-x86_64-2.7/src/scanner_opencl.o
src/scanner_opencl.c: In function ‘as_scanner_opencl_init’:
src/scanner_opencl.c:47:61: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
cl_context_properties properties[] = {CL_CONTEXT_PLATFORM, (int) platforms[0], 0};
^
src/scanner_opencl.c:76:3: warning: ‘clCreateCommandQueue’ is deprecated [-Wdeprecated-declarations]
this->queues[i] = clCreateCommandQueue(this->context, this->devices[i], 0, &error);
^
In file included from src/scanner_opencl.h:10:0,
from src/scanner_opencl.c:7:
/usr/include/CL/cl.h:1359:1: note: declared here
clCreateCommandQueue(cl_context / context */,
^
src/scanner_opencl.c: In function ‘opencl_scanner_devices’:
src/scanner_opencl.c:232:9: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
cl_int error;
^
In file included from src/scanner_opencl.h:13:0,
from src/scanner_opencl.c:7:
src/scanner_opencl.c: At top level:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_thread2.c -o build/temp.linux-x86_64-2.7/src/scanner_thread2.o
In file included from src/scanner_thread2.c:6:0:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_opencl2.c -o build/temp.linux-x86_64-2.7/src/scanner_opencl2.o
In file included from src/scanner_opencl.h:13:0,
from src/scanner_opencl2.c:7:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/operations.c -o build/temp.linux-x86_64-2.7/src/operations.o
src/operations.c: In function ‘sdm_generic_read’:
src/operations.c:341:26: warning: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration]
bs_set_bit(output, j, arc4random() % 2);
^
In file included from src/operations.c:5:0:
src/operations.c: At top level:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/lib/base64.c -o build/temp.linux-x86_64-2.7/src/lib/base64.o
gcc -pthread -shared -L/home/al/anaconda2/lib -Wl,-rpath=/home/al/anaconda2/lib,--no-as-needed build/temp.linux-x86_64-2.7/src/bitstring.o build/temp.linux-x86_64-2.7/src/address_space.o build/temp.linux-x86_64-2.7/src/counter.o build/temp.linux-x86_64-2.7/src/scanner_thread.o build/temp.linux-x86_64-2.7/src/scanner_opencl.o build/temp.linux-x86_64-2.7/src/scanner_thread2.o build/temp.linux-x86_64-2.7/src/scanner_opencl2.o build/temp.linux-x86_64-2.7/src/operations.o build/temp.linux-x86_64-2.7/src/lib/base64.o -L/home/al/anaconda2/lib -lOpenCL -lpthread -lbsd -lpython2.7 -o build/lib.linux-x86_64-2.7/sdm/_libsdm.so
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
Failed building wheel for sdm
Running setup.py clean for sdm
Failed to build sdm
Installing collected packages: sdm
Running setup.py install for sdm ... error
Complete output from command /home/al/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-Ep2WfM/sdm/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-y0U268/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/sdm
copying sdm/init.py -> build/lib.linux-x86_64-2.7/sdm
copying sdm/utils.py -> build/lib.linux-x86_64-2.7/sdm
copying sdm/scanner_opencl.cl -> build/lib.linux-x86_64-2.7/sdm
copying sdm/scanner_opencl2.cl -> build/lib.linux-x86_64-2.7/sdm
running build_ext
building 'sdm._libsdm' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/lib
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/bitstring.c -o build/temp.linux-x86_64-2.7/src/bitstring.o
src/bitstring.c: In function ‘bs_init_random’:
src/bitstring.c:80:2: warning: implicit declaration of function ‘arc4random_buf’ [-Wimplicit-function-declaration]
arc4random_buf(bs, sizeof(bitstring_t) * len);
^
src/bitstring.c: In function ‘bs_init_hex’:
src/bitstring.c:91:15: warning: format ‘%llx’ expects argument of type ‘long long unsigned int *’, but argument 3 has type ‘bitstring_t * {aka long unsigned int *}’ [-Wformat=]
sscanf(hex, "%016llx", bs);
^
src/bitstring.c: In function ‘bs_to_hex’:
src/bitstring.c:116:16: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘bitstring_t {aka long unsigned int}’ [-Wformat=]
sprintf(buf, "%016llx", *bs);
^
src/bitstring.c: In function ‘bs_average’:
src/bitstring.c:166:9: warning: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration]
if (arc4random() % 2) {
^
src/bitstring.c: In function ‘bs_flip_random_bits’:
src/bitstring.c:259:7: warning: implicit declaration of function ‘arc4random_uniform’ [-Wimplicit-function-declaration]
j = arc4random_uniform(i+1);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/address_space.c -o build/temp.linux-x86_64-2.7/src/address_space.o
In file included from src/address_space.c:9:0:
src/utils.h:5:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int is_little_endian() {
^
In file included from src/address_space.c:7:0:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/address_space.c: In function ‘as_init_from_b64_file’:
src/address_space.c:175:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, sizeof(line), fp);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/counter.c -o build/temp.linux-x86_64-2.7/src/counter.o
In file included from src/counter.c:12:0:
src/utils.h:5:5: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
int is_little_endian() {
^
src/counter.c: In function ‘counter_to_bitstring’:
src/counter.c:319:22: warning: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration]
bs_set_bit(bs, i, arc4random() % 2);
^
In file included from src/counter.c:10:0:
src/counter.c: At top level:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/counter.c: In function ‘counter_check_meta_file’:
src/counter.c:107:2: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line, sizeof(line), fp);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_thread.c -o build/temp.linux-x86_64-2.7/src/scanner_thread.o
In file included from src/scanner_thread.c:5:0:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_opencl.c -o build/temp.linux-x86_64-2.7/src/scanner_opencl.o
src/scanner_opencl.c: In function ‘as_scanner_opencl_init’:
src/scanner_opencl.c:47:61: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
cl_context_properties properties[] = {CL_CONTEXT_PLATFORM, (int) platforms[0], 0};
^
src/scanner_opencl.c:76:3: warning: ‘clCreateCommandQueue’ is deprecated [-Wdeprecated-declarations]
this->queues[i] = clCreateCommandQueue(this->context, this->devices[i], 0, &error);
^
In file included from src/scanner_opencl.h:10:0,
from src/scanner_opencl.c:7:
/usr/include/CL/cl.h:1359:1: note: declared here
clCreateCommandQueue(cl_context / context */,
^
src/scanner_opencl.c: In function ‘opencl_scanner_devices’:
src/scanner_opencl.c:232:9: warning: variable ‘error’ set but not used [-Wunused-but-set-variable]
cl_int error;
^
In file included from src/scanner_opencl.h:13:0,
from src/scanner_opencl.c:7:
src/scanner_opencl.c: At top level:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_thread2.c -o build/temp.linux-x86_64-2.7/src/scanner_thread2.o
In file included from src/scanner_thread2.c:6:0:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/scanner_opencl2.c -o build/temp.linux-x86_64-2.7/src/scanner_opencl2.o
In file included from src/scanner_opencl.h:13:0,
from src/scanner_opencl2.c:7:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/operations.c -o build/temp.linux-x86_64-2.7/src/operations.o
src/operations.c: In function ‘sdm_generic_read’:
src/operations.c:341:26: warning: implicit declaration of function ‘arc4random’ [-Wimplicit-function-declaration]
bs_set_bit(output, j, arc4random() % 2);
^
In file included from src/operations.c:5:0:
src/operations.c: At top level:
src/bitstring.h:23:21: warning: inline function ‘bs_distance_naive’ declared but never defined
inline unsigned int bs_distance_naive(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:22:21: warning: inline function ‘bs_distance_lookup16’ declared but never defined
inline unsigned int bs_distance_lookup16(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
src/bitstring.h:21:21: warning: inline function ‘bs_distance_popcount’ declared but never defined
inline unsigned int bs_distance_popcount(const bitstring_t *bs1, const bitstring_t *bs2, const unsigned int len);
^
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DSDM_USE_BITCOUNT_TABLE -DSDM_ENABLE_OPENCL -DOS_LINUX -I/home/al/anaconda2/include/python2.7 -c src/lib/base64.c -o build/temp.linux-x86_64-2.7/src/lib/base64.o
gcc -pthread -shared -L/home/al/anaconda2/lib -Wl,-rpath=/home/al/anaconda2/lib,--no-as-needed build/temp.linux-x86_64-2.7/src/bitstring.o build/temp.linux-x86_64-2.7/src/address_space.o build/temp.linux-x86_64-2.7/src/counter.o build/temp.linux-x86_64-2.7/src/scanner_thread.o build/temp.linux-x86_64-2.7/src/scanner_opencl.o build/temp.linux-x86_64-2.7/src/scanner_thread2.o build/temp.linux-x86_64-2.7/src/scanner_opencl2.o build/temp.linux-x86_64-2.7/src/operations.o build/temp.linux-x86_64-2.7/src/lib/base64.o -L/home/al/anaconda2/lib -lOpenCL -lpthread -lbsd -lpython2.7 -o build/lib.linux-x86_64-2.7/sdm/_libsdm.so
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/home/al/anaconda2/bin/python -u -c "import setuptools, tokenize;file='/tmp/pip-install-Ep2WfM/sdm/setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record /tmp/pip-record-y0U268/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-Ep2WfM/sdm/
Does this work with Ubuntu 14.04?
I think a Jupyter notebook could be awesome for attracting new users, and also for demonstrating the features in the paper. What do you think, @msbrogli ?
I'll look into that.
I'm thinking about some new graphs that we could make, showing the landscape of one attractor, then 2 attractors, then 3, then trying to interact with them through xor and chunking. Remind me about this?
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.