ndtypes 0.2.0dev4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CONTRIBUTING.md +50 -0
- data/Gemfile +2 -0
- data/History.md +0 -0
- data/README.md +19 -0
- data/Rakefile +125 -0
- data/ext/ruby_ndtypes/extconf.rb +55 -0
- data/ext/ruby_ndtypes/gc_guard.c +36 -0
- data/ext/ruby_ndtypes/gc_guard.h +12 -0
- data/ext/ruby_ndtypes/ndtypes/AUTHORS.txt +5 -0
- data/ext/ruby_ndtypes/ndtypes/INSTALL.txt +101 -0
- data/ext/ruby_ndtypes/ndtypes/LICENSE.txt +29 -0
- data/ext/ruby_ndtypes/ndtypes/MANIFEST.in +3 -0
- data/ext/ruby_ndtypes/ndtypes/Makefile.in +87 -0
- data/ext/ruby_ndtypes/ndtypes/README.rst +47 -0
- data/ext/ruby_ndtypes/ndtypes/config.guess +1530 -0
- data/ext/ruby_ndtypes/ndtypes/config.h.in +67 -0
- data/ext/ruby_ndtypes/ndtypes/config.sub +1782 -0
- data/ext/ruby_ndtypes/ndtypes/configure +5260 -0
- data/ext/ruby_ndtypes/ndtypes/configure.ac +161 -0
- data/ext/ruby_ndtypes/ndtypes/doc/Makefile +14 -0
- data/ext/ruby_ndtypes/ndtypes/doc/_static/copybutton.js +66 -0
- data/ext/ruby_ndtypes/ndtypes/doc/conf.py +26 -0
- data/ext/ruby_ndtypes/ndtypes/doc/grammar/grammar.rst +27 -0
- data/ext/ruby_ndtypes/ndtypes/doc/index.rst +56 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/context.rst +131 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/encodings.rst +68 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/fields-values.rst +175 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/functions.rst +72 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/index.rst +43 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/init.rst +48 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/io.rst +100 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/memory.rst +124 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/predicates.rst +110 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/typedef.rst +31 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/types.rst +594 -0
- data/ext/ruby_ndtypes/ndtypes/doc/libndtypes/util.rst +166 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/buffer-protocol.rst +27 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/index.rst +21 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/pattern-matching.rst +330 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/quickstart.rst +144 -0
- data/ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst +544 -0
- data/ext/ruby_ndtypes/ndtypes/doc/releases/index.rst +35 -0
- data/ext/ruby_ndtypes/ndtypes/install-sh +527 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in +271 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc +269 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c +230 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.c +268 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/attr.h +109 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.in +73 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.vc +70 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/README.txt +16 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c +2179 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h +134 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y +428 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c +2543 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h +735 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l +176 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c +543 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c +110 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/context.c +228 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/copy.c +634 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/encodings.c +116 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/equal.c +288 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c +3067 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h +180 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y +417 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/io.c +1658 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c +2773 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h +734 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l +222 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/match.c +1132 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c +2323 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in +893 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/overflow.h +161 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c +473 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h +92 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/parser.c +246 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.c +269 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/seq.h +197 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.in +48 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.vc +46 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c +1007 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c +442 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/slice.h +42 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c +238 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h +50 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c +371 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h +100 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in +55 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc +45 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.c +82 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.h +49 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c +1657 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h +85 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c +115 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c +137 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_indent.c +201 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c +2397 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_numba.c +57 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c +349 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c +27839 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c +350 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c +231 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c +375 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typedef.c +65 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tests/valgrind.supp +30 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/bench.c +79 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/indent.c +94 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/tools/print_ast.c +96 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/util.c +474 -0
- data/ext/ruby_ndtypes/ndtypes/libndtypes/values.c +228 -0
- data/ext/ruby_ndtypes/ndtypes/python/bench.py +49 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py +409 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndt_support.py +14 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py +70 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c +1332 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/docstrings.h +319 -0
- data/ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h +154 -0
- data/ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py +1977 -0
- data/ext/ruby_ndtypes/ndtypes/setup.py +288 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/INSTALL.txt +41 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest32.bat +15 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/runtest64.bat +13 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild32.bat +38 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild64.bat +38 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcclean.bat +13 -0
- data/ext/ruby_ndtypes/ndtypes/vcbuild/vcdistclean.bat +14 -0
- data/ext/ruby_ndtypes/ruby_ndtypes.c +1003 -0
- data/ext/ruby_ndtypes/ruby_ndtypes.h +37 -0
- data/ext/ruby_ndtypes/ruby_ndtypes_internal.h +28 -0
- data/lib/ndtypes.rb +45 -0
- data/lib/ndtypes/errors.rb +2 -0
- data/lib/ndtypes/version.rb +6 -0
- data/ndtypes.gemspec +47 -0
- data/spec/gc_table_spec.rb +10 -0
- data/spec/ndtypes_spec.rb +289 -0
- data/spec/spec_helper.rb +241 -0
- metadata +242 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,241 @@
|
|
1
|
+
require 'ndtypes'
|
2
|
+
require 'pry'
|
3
|
+
|
4
|
+
def expect_serialize t
|
5
|
+
b = t.serialize
|
6
|
+
u = NDTypes.deserialize b.b
|
7
|
+
|
8
|
+
expect(u).to eq(t)
|
9
|
+
end
|
10
|
+
|
11
|
+
SIZEOF_PTR = 8#get_sizeof_void_p
|
12
|
+
|
13
|
+
Struct.new("M", :itemsize, :align)
|
14
|
+
M = Struct::M
|
15
|
+
|
16
|
+
DTYPE_TEST_CASES = [
|
17
|
+
# Tuples
|
18
|
+
["()", M.new(0, 1)],
|
19
|
+
["(complex128)", M.new(16, 8)],
|
20
|
+
|
21
|
+
["(int8, int64)", M.new(16, 8)],
|
22
|
+
["(int8, int64, pack=1)", M.new(9, 1)],
|
23
|
+
["(int8, int64, pack=2)", M.new(10, 2)],
|
24
|
+
["(int8, int64, pack=4)", M.new(12, 4)],
|
25
|
+
["(int8, int64, pack=8)", M.new(16, 8)],
|
26
|
+
["(int8, int64, pack=16)", M.new(32, 16)],
|
27
|
+
|
28
|
+
["(int8, int64, align=1)", M.new(16, 8)],
|
29
|
+
["(int8, int64, align=2)", M.new(16, 8)],
|
30
|
+
["(int8, int64, align=4)", M.new(16, 8)],
|
31
|
+
["(int8, int64, align=8)", M.new(16, 8)],
|
32
|
+
["(int8, int64, align=16)", M.new(16, 16)],
|
33
|
+
|
34
|
+
["(int8 |align=1|, int64)", M.new(16, 8)],
|
35
|
+
["(int8 |align=2|, int64)", M.new(16, 8)],
|
36
|
+
["(int8 |align=4|, int64)", M.new(16, 8)],
|
37
|
+
["(int8 |align=8|, int64)", M.new(16, 8)],
|
38
|
+
["(int8 |align=16|, int64)", M.new(16, 16)],
|
39
|
+
|
40
|
+
["(uint16, (complex64))", M.new(12, 4)],
|
41
|
+
["(uint16, (complex64), pack=1)", M.new(10, 1)],
|
42
|
+
["(uint16, (complex64), pack=2)", M.new(10, 2)],
|
43
|
+
["(uint16, (complex64), pack=4)", M.new(12, 4)],
|
44
|
+
["(uint16, (complex64), pack=8)", M.new(16, 8)],
|
45
|
+
|
46
|
+
["(uint16, (complex64), align=1)", M.new(12, 4)],
|
47
|
+
["(uint16, (complex64), align=2)", M.new(12, 4)],
|
48
|
+
["(uint16, (complex64), align=4)", M.new(12, 4)],
|
49
|
+
["(uint16, (complex64), align=8)", M.new(16, 8)],
|
50
|
+
|
51
|
+
# References to tuples
|
52
|
+
["&(uint16, (complex64), align=1)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
53
|
+
["(uint16, &(complex64), pack=1)", M.new(2+SIZEOF_PTR, 1)],
|
54
|
+
|
55
|
+
# Constructor containing references to tuples
|
56
|
+
["Some(&(uint16, (complex64), align=1))", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
57
|
+
["Some((uint16, &(complex64), pack=1))", M.new(2+SIZEOF_PTR, 1)],
|
58
|
+
|
59
|
+
# Optional tuples
|
60
|
+
["?(uint16, (complex64), align=1)", M.new(12, 4)],
|
61
|
+
["(uint16, ?(complex64), align=1)", M.new(12, 4)],
|
62
|
+
["?(uint16, ?(complex64), align=1)", M.new(12, 4)],
|
63
|
+
["?(uint16, (complex64), align=2)", M.new(12, 4)],
|
64
|
+
["(uint16, ?(complex64), align=4)", M.new(12, 4)],
|
65
|
+
["?(uint16, ?(complex64), align=8)", M.new(16, 8)],
|
66
|
+
|
67
|
+
# References to optional tuples or tuples with optional subtrees
|
68
|
+
["&?(uint16, (complex64), align=1)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
69
|
+
["&(uint16, ?(complex64), align=1)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
70
|
+
|
71
|
+
# Constructor containing optional tuples or tuples with optional subtrees
|
72
|
+
["Some(?(uint16, (complex64), align=1))", M.new(12, 4)],
|
73
|
+
["Some((uint16, ?(complex64), align=1))", M.new(12, 4)],
|
74
|
+
|
75
|
+
# Records
|
76
|
+
["{}", M.new(0, 1)],
|
77
|
+
["{x: complex128}", M.new(16, 8)],
|
78
|
+
|
79
|
+
["{x: int8, y: int64}", M.new(16, 8)],
|
80
|
+
["{x: int8, y: int64, pack=1}", M.new(9, 1)],
|
81
|
+
["{x: int8, y: int64, pack=2}", M.new(10, 2)],
|
82
|
+
["{x: int8, y: int64, pack=4}", M.new(12, 4)],
|
83
|
+
["{x: int8, y: int64, pack=8}", M.new(16, 8)],
|
84
|
+
["{x: int8, y: int64, pack=16}", M.new(32, 16)],
|
85
|
+
|
86
|
+
["{x: uint16, y: {z: complex128}}", M.new(24, 8)],
|
87
|
+
["{x: uint16, y: {z: complex128, align=16}}", M.new(32, 16)],
|
88
|
+
["{x: uint16, y: {z: complex128}, align=16}", M.new(32, 16)],
|
89
|
+
|
90
|
+
# Primitive types
|
91
|
+
["bool", M.new(1, 1)],
|
92
|
+
|
93
|
+
["int8", M.new(1, 1)],
|
94
|
+
["int16", M.new(2, 2)],
|
95
|
+
["int32", M.new(4, 4)],
|
96
|
+
["int64", M.new(8, 8)],
|
97
|
+
|
98
|
+
["uint8", M.new(1, 1)],
|
99
|
+
["uint16", M.new(2, 2)],
|
100
|
+
["uint32", M.new(4, 4)],
|
101
|
+
["uint64", M.new(8, 8)],
|
102
|
+
|
103
|
+
["float32", M.new(4, 4)],
|
104
|
+
["float64", M.new(8, 8)],
|
105
|
+
|
106
|
+
["complex64", M.new(8, 4)],
|
107
|
+
["complex128", M.new(16, 8)],
|
108
|
+
|
109
|
+
# Primitive optional types
|
110
|
+
["?bool", M.new(1, 1)],
|
111
|
+
|
112
|
+
["?int8", M.new(1, 1)],
|
113
|
+
["?int16", M.new(2, 2)],
|
114
|
+
["?int32", M.new(4, 4)],
|
115
|
+
["?int64", M.new(8, 8)],
|
116
|
+
|
117
|
+
["?uint8", M.new(1, 1)],
|
118
|
+
["?uint16", M.new(2, 2)],
|
119
|
+
["?uint32", M.new(4, 4)],
|
120
|
+
["?uint64", M.new(8, 8)],
|
121
|
+
|
122
|
+
["?float32", M.new(4, 4)],
|
123
|
+
["?float64", M.new(8, 8)],
|
124
|
+
|
125
|
+
["?complex64", M.new(8, 4)],
|
126
|
+
["?complex128", M.new(16, 8)],
|
127
|
+
|
128
|
+
# References
|
129
|
+
["&bool", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
130
|
+
|
131
|
+
["&int8", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
132
|
+
["&int16", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
133
|
+
["&int32", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
134
|
+
["&int64", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
135
|
+
|
136
|
+
["ref(uint8)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
137
|
+
["ref(uint16)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
138
|
+
["ref(uint32)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
139
|
+
["ref(uint64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
140
|
+
|
141
|
+
["ref(float32)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
142
|
+
["ref(float64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
143
|
+
|
144
|
+
["ref(complex64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
145
|
+
["ref(complex128)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
146
|
+
|
147
|
+
# Optional references
|
148
|
+
["?&bool", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
149
|
+
|
150
|
+
["?&int8", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
151
|
+
["?&int16", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
152
|
+
["?&int32", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
153
|
+
["?&int64", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
154
|
+
|
155
|
+
["?ref(uint8)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
156
|
+
["?ref(uint16)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
157
|
+
["?ref(uint32)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
158
|
+
["?ref(uint64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
159
|
+
|
160
|
+
["?ref(float32)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
161
|
+
["?ref(float64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
162
|
+
|
163
|
+
["?ref(complex64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
164
|
+
["?ref(complex128)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
165
|
+
|
166
|
+
# References to optional types
|
167
|
+
["&?bool", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
168
|
+
|
169
|
+
["&?int8", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
170
|
+
["&?int16", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
171
|
+
["&?int32", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
172
|
+
["&?int64", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
173
|
+
|
174
|
+
["ref(?uint8)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
175
|
+
["ref(?uint16)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
176
|
+
["ref(?uint32)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
177
|
+
["ref(?uint64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
178
|
+
|
179
|
+
["ref(?float32)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
180
|
+
["ref(?float64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
181
|
+
|
182
|
+
["ref(?complex64)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
183
|
+
["ref(?complex128)", M.new(SIZEOF_PTR, SIZEOF_PTR)],
|
184
|
+
|
185
|
+
# Constructors
|
186
|
+
["Some(bool)", M.new(1, 1)],
|
187
|
+
|
188
|
+
["Some(int8)", M.new(1, 1)],
|
189
|
+
["Some(int16)", M.new(2, 2)],
|
190
|
+
["Some(int32)", M.new(4, 4)],
|
191
|
+
["Some(int64)", M.new(8, 8)],
|
192
|
+
|
193
|
+
["Some(uint8)", M.new(1, 1)],
|
194
|
+
["Some(uint16)", M.new(2, 2)],
|
195
|
+
["Some(uint32)", M.new(4, 4)],
|
196
|
+
["Some(uint64)", M.new(8, 8)],
|
197
|
+
|
198
|
+
["Some(float32)", M.new(4, 4)],
|
199
|
+
["Some(float64)", M.new(8, 8)],
|
200
|
+
|
201
|
+
["Some(complex64)", M.new(8, 4)],
|
202
|
+
["Some(complex128)", M.new(16, 8)],
|
203
|
+
|
204
|
+
# Optional constructors
|
205
|
+
["?Some(bool)", M.new(1, 1)],
|
206
|
+
|
207
|
+
["?Some(int8)", M.new(1, 1)],
|
208
|
+
["?Some(int16)", M.new(2, 2)],
|
209
|
+
["?Some(int32)", M.new(4, 4)],
|
210
|
+
["?Some(int64)", M.new(8, 8)],
|
211
|
+
|
212
|
+
["?Some(uint8)", M.new(1, 1)],
|
213
|
+
["?Some(uint16)", M.new(2, 2)],
|
214
|
+
["?Some(uint32)", M.new(4, 4)],
|
215
|
+
["?Some(uint64)", M.new(8, 8)],
|
216
|
+
|
217
|
+
["?Some(float32)", M.new(4, 4)],
|
218
|
+
["?Some(float64)", M.new(8, 8)],
|
219
|
+
|
220
|
+
["?Some(complex64)", M.new(8, 4)],
|
221
|
+
["?Some(complex128)", M.new(16, 8)],
|
222
|
+
|
223
|
+
# Constructors containing optional types
|
224
|
+
["Some(?bool)", M.new(1, 1)],
|
225
|
+
|
226
|
+
["Some(?int8)", M.new(1, 1)],
|
227
|
+
["Some(?int16)", M.new(2, 2)],
|
228
|
+
["Some(?int32)", M.new(4, 4)],
|
229
|
+
["Some(?int64)", M.new(8, 8)],
|
230
|
+
|
231
|
+
["Some(?uint8)", M.new(1, 1)],
|
232
|
+
["Some(?uint16)", M.new(2, 2)],
|
233
|
+
["Some(?uint32)", M.new(4, 4)],
|
234
|
+
["Some(?uint64)", M.new(8, 8)],
|
235
|
+
|
236
|
+
["Some(?float32)", M.new(4, 4)],
|
237
|
+
["Some(?float64)", M.new(8, 8)],
|
238
|
+
|
239
|
+
["Some(?complex64)", M.new(8, 4)],
|
240
|
+
["Some(?complex128)", M.new(16, 8)],
|
241
|
+
]
|
metadata
ADDED
@@ -0,0 +1,242 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ndtypes
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.0dev4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Sameer Deshmukh
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-09-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.8'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: pry-byebug
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: "NDtypes is library for defining memory shapes using a easy and friendly
|
70
|
+
interface.\n \nIt is a wrapper over the libndtypes C library.\n"
|
71
|
+
email:
|
72
|
+
- sameer.deshmukh93@gmail.com
|
73
|
+
executables: []
|
74
|
+
extensions:
|
75
|
+
- ext/ruby_ndtypes/extconf.rb
|
76
|
+
extra_rdoc_files: []
|
77
|
+
files:
|
78
|
+
- CONTRIBUTING.md
|
79
|
+
- Gemfile
|
80
|
+
- History.md
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- ext/ruby_ndtypes/extconf.rb
|
84
|
+
- ext/ruby_ndtypes/gc_guard.c
|
85
|
+
- ext/ruby_ndtypes/gc_guard.h
|
86
|
+
- ext/ruby_ndtypes/ndtypes/AUTHORS.txt
|
87
|
+
- ext/ruby_ndtypes/ndtypes/INSTALL.txt
|
88
|
+
- ext/ruby_ndtypes/ndtypes/LICENSE.txt
|
89
|
+
- ext/ruby_ndtypes/ndtypes/MANIFEST.in
|
90
|
+
- ext/ruby_ndtypes/ndtypes/Makefile.in
|
91
|
+
- ext/ruby_ndtypes/ndtypes/README.rst
|
92
|
+
- ext/ruby_ndtypes/ndtypes/config.guess
|
93
|
+
- ext/ruby_ndtypes/ndtypes/config.h.in
|
94
|
+
- ext/ruby_ndtypes/ndtypes/config.sub
|
95
|
+
- ext/ruby_ndtypes/ndtypes/configure
|
96
|
+
- ext/ruby_ndtypes/ndtypes/configure.ac
|
97
|
+
- ext/ruby_ndtypes/ndtypes/doc/Makefile
|
98
|
+
- ext/ruby_ndtypes/ndtypes/doc/_static/copybutton.js
|
99
|
+
- ext/ruby_ndtypes/ndtypes/doc/conf.py
|
100
|
+
- ext/ruby_ndtypes/ndtypes/doc/grammar/grammar.rst
|
101
|
+
- ext/ruby_ndtypes/ndtypes/doc/index.rst
|
102
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/context.rst
|
103
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/encodings.rst
|
104
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/fields-values.rst
|
105
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/functions.rst
|
106
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/index.rst
|
107
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/init.rst
|
108
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/io.rst
|
109
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/memory.rst
|
110
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/predicates.rst
|
111
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/typedef.rst
|
112
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/types.rst
|
113
|
+
- ext/ruby_ndtypes/ndtypes/doc/libndtypes/util.rst
|
114
|
+
- ext/ruby_ndtypes/ndtypes/doc/ndtypes/buffer-protocol.rst
|
115
|
+
- ext/ruby_ndtypes/ndtypes/doc/ndtypes/index.rst
|
116
|
+
- ext/ruby_ndtypes/ndtypes/doc/ndtypes/pattern-matching.rst
|
117
|
+
- ext/ruby_ndtypes/ndtypes/doc/ndtypes/quickstart.rst
|
118
|
+
- ext/ruby_ndtypes/ndtypes/doc/ndtypes/types.rst
|
119
|
+
- ext/ruby_ndtypes/ndtypes/doc/releases/index.rst
|
120
|
+
- ext/ruby_ndtypes/ndtypes/install-sh
|
121
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.in
|
122
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/Makefile.vc
|
123
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/alloc.c
|
124
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/attr.c
|
125
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/attr.h
|
126
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.in
|
127
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/Makefile.vc
|
128
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/README.txt
|
129
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.c
|
130
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.h
|
131
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/bpgrammar.y
|
132
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.c
|
133
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.h
|
134
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/bplexer.l
|
135
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/export.c
|
136
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/compat/import.c
|
137
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/context.c
|
138
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/copy.c
|
139
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/encodings.c
|
140
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/equal.c
|
141
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/grammar.c
|
142
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/grammar.h
|
143
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/grammar.y
|
144
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/io.c
|
145
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/lexer.c
|
146
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/lexer.h
|
147
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/lexer.l
|
148
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/match.c
|
149
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.c
|
150
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/ndtypes.h.in
|
151
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/overflow.h
|
152
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.c
|
153
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/parsefuncs.h
|
154
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/parser.c
|
155
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/seq.c
|
156
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/seq.h
|
157
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.in
|
158
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/serialize/Makefile.vc
|
159
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/serialize/deserialize.c
|
160
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/serialize/serialize.c
|
161
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/slice.h
|
162
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/substitute.c
|
163
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/substitute.h
|
164
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/symtable.c
|
165
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/symtable.h
|
166
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.in
|
167
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/Makefile.vc
|
168
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.c
|
169
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/alloc_fail.h
|
170
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/runtest.c
|
171
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test.h
|
172
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_array.c
|
173
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_buffer.c
|
174
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_indent.c
|
175
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_match.c
|
176
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_numba.c
|
177
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse.c
|
178
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_error.c
|
179
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_parse_roundtrip.c
|
180
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_record.c
|
181
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typecheck.c
|
182
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/test_typedef.c
|
183
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tests/valgrind.supp
|
184
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tools/bench.c
|
185
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tools/indent.c
|
186
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/tools/print_ast.c
|
187
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/util.c
|
188
|
+
- ext/ruby_ndtypes/ndtypes/libndtypes/values.c
|
189
|
+
- ext/ruby_ndtypes/ndtypes/python/bench.py
|
190
|
+
- ext/ruby_ndtypes/ndtypes/python/ndt_randtype.py
|
191
|
+
- ext/ruby_ndtypes/ndtypes/python/ndt_support.py
|
192
|
+
- ext/ruby_ndtypes/ndtypes/python/ndtypes/__init__.py
|
193
|
+
- ext/ruby_ndtypes/ndtypes/python/ndtypes/_ndtypes.c
|
194
|
+
- ext/ruby_ndtypes/ndtypes/python/ndtypes/docstrings.h
|
195
|
+
- ext/ruby_ndtypes/ndtypes/python/ndtypes/pyndtypes.h
|
196
|
+
- ext/ruby_ndtypes/ndtypes/python/test_ndtypes.py
|
197
|
+
- ext/ruby_ndtypes/ndtypes/setup.py
|
198
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/INSTALL.txt
|
199
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/runtest32.bat
|
200
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/runtest64.bat
|
201
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild32.bat
|
202
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/vcbuild64.bat
|
203
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/vcclean.bat
|
204
|
+
- ext/ruby_ndtypes/ndtypes/vcbuild/vcdistclean.bat
|
205
|
+
- ext/ruby_ndtypes/ruby_ndtypes.c
|
206
|
+
- ext/ruby_ndtypes/ruby_ndtypes.h
|
207
|
+
- ext/ruby_ndtypes/ruby_ndtypes_internal.h
|
208
|
+
- lib/ndtypes.rb
|
209
|
+
- lib/ndtypes/errors.rb
|
210
|
+
- lib/ndtypes/version.rb
|
211
|
+
- ndtypes.gemspec
|
212
|
+
- spec/gc_table_spec.rb
|
213
|
+
- spec/ndtypes_spec.rb
|
214
|
+
- spec/spec_helper.rb
|
215
|
+
homepage: https://github.com/plures/ndtypes
|
216
|
+
licenses:
|
217
|
+
- BSD-3-Clause
|
218
|
+
metadata: {}
|
219
|
+
post_install_message:
|
220
|
+
rdoc_options: []
|
221
|
+
require_paths:
|
222
|
+
- lib
|
223
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
224
|
+
requirements:
|
225
|
+
- - ">="
|
226
|
+
- !ruby/object:Gem::Version
|
227
|
+
version: '0'
|
228
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
229
|
+
requirements:
|
230
|
+
- - ">"
|
231
|
+
- !ruby/object:Gem::Version
|
232
|
+
version: 1.3.1
|
233
|
+
requirements: []
|
234
|
+
rubyforge_project:
|
235
|
+
rubygems_version: 2.6.14
|
236
|
+
signing_key:
|
237
|
+
specification_version: 4
|
238
|
+
summary: Ruby wrapper over libndtypes. A library for typing memory blocks.
|
239
|
+
test_files:
|
240
|
+
- spec/gc_table_spec.rb
|
241
|
+
- spec/ndtypes_spec.rb
|
242
|
+
- spec/spec_helper.rb
|