red-arrow-gsl 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/doc/text/news.md +6 -0
- data/ext/arrow-gsl/arrow-gsl.c +23 -14
- data/ext/arrow-gsl/extconf.rb +4 -2
- data/lib/arrow-gsl/version.rb +1 -1
- data/red-arrow-gsl.gemspec +2 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c44b8280f85040519f6be536d772b14a06bae86edeb6f95d7a0965f6f6be4c93
|
4
|
+
data.tar.gz: fdcf74a31d45e07ef79f9a3f7f0ff56ef66e5d707a5867c62f82553ee3edd619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 385c584ed390188039f83beb691c753638e758548db03c60f496c8717d2c0bacfd0f4d9140ed69d44d7d385aac15d7806d640c59f7c690080e047c113b589629
|
7
|
+
data.tar.gz: 849105879884f5e2b25f944d16ec0c97557aaf80fa5dd981ddcd92a1aab22652b1e181eacb434290ad8ed6e09a78897d21439716b60b2323e6a24006ea1c7cd0
|
data/doc/text/news.md
CHANGED
data/ext/arrow-gsl/arrow-gsl.c
CHANGED
@@ -18,7 +18,10 @@
|
|
18
18
|
|
19
19
|
#include <rbgobject.h>
|
20
20
|
|
21
|
-
#include <rb_gsl.h>
|
21
|
+
#include <include/rb_gsl.h>
|
22
|
+
|
23
|
+
static VALUE rb_GSLMatrix;
|
24
|
+
static VALUE rb_GSLMatrixInt;
|
22
25
|
|
23
26
|
void Init_arrow_gsl(void);
|
24
27
|
|
@@ -82,7 +85,7 @@ rb_arrow_tensor_to_gsl(VALUE self)
|
|
82
85
|
g_bytes_unref(data);
|
83
86
|
g_object_unref(buffer);
|
84
87
|
|
85
|
-
rb_matrix = Data_Wrap_Struct(
|
88
|
+
rb_matrix = Data_Wrap_Struct(rb_GSLMatrixInt,
|
86
89
|
NULL,
|
87
90
|
gsl_matrix_int_free,
|
88
91
|
matrix);
|
@@ -101,7 +104,7 @@ rb_arrow_tensor_to_gsl(VALUE self)
|
|
101
104
|
g_bytes_unref(data);
|
102
105
|
g_object_unref(buffer);
|
103
106
|
|
104
|
-
rb_matrix = Data_Wrap_Struct(
|
107
|
+
rb_matrix = Data_Wrap_Struct(rb_GSLMatrix,
|
105
108
|
NULL,
|
106
109
|
gsl_matrix_free,
|
107
110
|
matrix);
|
@@ -207,15 +210,21 @@ Init_arrow_gsl(void)
|
|
207
210
|
rb_define_method(rb_ArrowTensor, "to_gsl",
|
208
211
|
rb_arrow_tensor_to_gsl, 0);
|
209
212
|
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
213
|
+
{
|
214
|
+
VALUE rb_GSL = rb_const_get(rb_cObject, rb_intern("GSL"));
|
215
|
+
|
216
|
+
/*
|
217
|
+
rb_define_method(cgsl_vector_int, "to_arrow",
|
218
|
+
rb_gsl_vector_int_to_arrow, 0);
|
219
|
+
rb_define_method(cgsl_vector, "to_arrow",
|
220
|
+
rb_gsl_vector_to_arrow, 0);
|
221
|
+
*/
|
222
|
+
|
223
|
+
rb_GSLMatrix = rb_const_get(rb_GSL, rb_intern("Matrix"));
|
224
|
+
rb_GSLMatrixInt = rb_const_get(rb_GSLMatrix, rb_intern("Int"));
|
225
|
+
rb_define_method(rb_GSLMatrixInt, "to_arrow",
|
226
|
+
rb_gsl_matrix_int_to_arrow, 0);
|
227
|
+
rb_define_method(rb_GSLMatrix, "to_arrow",
|
228
|
+
rb_gsl_matrix_to_arrow, 0);
|
229
|
+
}
|
221
230
|
}
|
data/ext/arrow-gsl/extconf.rb
CHANGED
@@ -12,13 +12,13 @@
|
|
12
12
|
# See the License for the specific language governing permissions and
|
13
13
|
# limitations under the License.
|
14
14
|
|
15
|
-
require "mkmf-
|
15
|
+
require "mkmf-gnome"
|
16
16
|
|
17
17
|
required_pkg_config_package("arrow-glib")
|
18
18
|
|
19
19
|
[
|
20
20
|
["glib2", "ext/glib2"],
|
21
|
-
["gsl", "ext/gsl_native
|
21
|
+
["gsl", "ext/gsl_native"],
|
22
22
|
].each do |name, source_dir|
|
23
23
|
spec = find_gem_spec(name)
|
24
24
|
source_dir = File.join(spec.full_gem_path, source_dir)
|
@@ -26,4 +26,6 @@ required_pkg_config_package("arrow-glib")
|
|
26
26
|
add_depend_package_path(name, source_dir, build_dir)
|
27
27
|
end
|
28
28
|
|
29
|
+
have_library("gsl") or exit(false)
|
30
|
+
|
29
31
|
create_makefile("arrow_gsl")
|
data/lib/arrow-gsl/version.rb
CHANGED
data/red-arrow-gsl.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red-arrow-gsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: red-arrow
|
@@ -126,7 +126,7 @@ description: 'Red Arrow GSL adds `Arrow::*Array#to_gsl`/`Arrow::Tensor#to_gsl` f
|
|
126
126
|
Apache Arrow to GSL conversion. Red Arrow GSL adds `GSL::Vector#to_arrow`/`GSL::Vector::Int#to_arrow`/`GSL::Matrix::*#to_arrow`
|
127
127
|
for GSL to Apache Arrow conversion.
|
128
128
|
|
129
|
-
'
|
129
|
+
'
|
130
130
|
email:
|
131
131
|
- kou@clear-code.com
|
132
132
|
executables: []
|
@@ -152,7 +152,8 @@ files:
|
|
152
152
|
homepage: https://github.com/red-data-tools/red-arrow-gsl
|
153
153
|
licenses:
|
154
154
|
- Apache-2.0
|
155
|
-
metadata:
|
155
|
+
metadata:
|
156
|
+
msys2_mingw_dependencies: gsl
|
156
157
|
post_install_message:
|
157
158
|
rdoc_options: []
|
158
159
|
require_paths:
|
@@ -168,15 +169,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
169
|
- !ruby/object:Gem::Version
|
169
170
|
version: '0'
|
170
171
|
requirements: []
|
171
|
-
|
172
|
-
rubygems_version: 2.5.2
|
172
|
+
rubygems_version: 3.2.0.rc.2
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: Red Arrow GSL is a library that provides converters between Apache Arrow's
|
176
176
|
array data (`Arrow::*Array`) / tensor data (`Arrow::Tensor`) and Ruby/GSL's vector
|
177
177
|
data (`GSL::Vector` and `GSL::Vector::Int`) / matrix data (`GSL::Matrix::*`).
|
178
178
|
test_files:
|
179
|
-
- test/test-to-gsl.rb
|
180
|
-
- test/run-test.rb
|
181
179
|
- test/helper.rb
|
180
|
+
- test/run-test.rb
|
182
181
|
- test/test-to-arrow.rb
|
182
|
+
- test/test-to-gsl.rb
|