vdsp 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/vdsp/vdsp.c +14 -1
- data/lib/vdsp/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3f7d6b02cc02ee6307b867050c4ce0ecd687b5202816b54c7ca996648c2da33
|
4
|
+
data.tar.gz: 75c154622f19d6491e770a7fe24e793de274706c6b0e8aa0a3278e2346d8a784
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1929ae32bde77dde073ea2e606234702a0566ff26fe1d48d206f0d9bed5ce4832287f1b014ed1f5431fde7189cd903c64998b59d96342c038c8c3af74d232f1e
|
7
|
+
data.tar.gz: 17a0090b4cae480fd3cf4a32cd0d63fc800abc1882ca7508ed8723e0286963c4da2582dd2cf38224b9920ce95fe27e9786fd4b61d88b28f40af241c9c1d5cfc4
|
data/ext/vdsp/vdsp.c
CHANGED
@@ -154,6 +154,18 @@ VALUE rb_double_array_initialize(VALUE self, VALUE length)
|
|
154
154
|
return self;
|
155
155
|
}
|
156
156
|
|
157
|
+
VALUE rb_double_array_initialize_copy(VALUE self, VALUE orig)
|
158
|
+
{
|
159
|
+
VALUE length = rb_vdsp_array_length(orig);
|
160
|
+
rb_double_array_initialize(self, length);
|
161
|
+
|
162
|
+
VdspArrayNativeResource *dst = get_vdsp_array_native_resource(self);
|
163
|
+
VdspArrayNativeResource *src = get_vdsp_array_native_resource(orig);
|
164
|
+
memcpy(dst->v.ptr, src->v.ptr, sizeof(double) * src->length);
|
165
|
+
|
166
|
+
return self;
|
167
|
+
}
|
168
|
+
|
157
169
|
VALUE rb_double_array_set_values(VALUE self, VALUE ary)
|
158
170
|
{
|
159
171
|
if (!RB_TYPE_P(ary, T_ARRAY)) {
|
@@ -1262,7 +1274,7 @@ VALUE rb_double_vsbsbm(int argc, VALUE *argv, VALUE cls)
|
|
1262
1274
|
return e;
|
1263
1275
|
}
|
1264
1276
|
|
1265
|
-
// e[i] = (a[i] + b[i]) * (c[i]
|
1277
|
+
// e[i] = (a[i] + b[i]) * (c[i] - d[i])
|
1266
1278
|
VALUE rb_double_vasbm(int argc, VALUE *argv, VALUE cls)
|
1267
1279
|
{
|
1268
1280
|
if (argc!=16) {
|
@@ -1927,6 +1939,7 @@ void Init_vdsp()
|
|
1927
1939
|
rb_cDoubleArray = rb_define_class_under(rb_mVdsp, "DoubleArray", rb_cObject);
|
1928
1940
|
rb_include_module(rb_cDoubleArray, rb_mVdspArray);
|
1929
1941
|
rb_define_method(rb_cDoubleArray, "initialize", rb_double_array_initialize, 1);
|
1942
|
+
rb_define_private_method(rb_cDoubleArray, "initialize_copy", rb_double_array_initialize_copy, 1);
|
1930
1943
|
rb_define_singleton_method(rb_cDoubleArray, "create", rb_double_array_create, 1);
|
1931
1944
|
rb_define_method(rb_cDoubleArray, "to_da", rb_double_array_to_da, 0);
|
1932
1945
|
rb_define_method(rb_cDoubleArray, "+", rb_double_array_plus, 1);
|
data/lib/vdsp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vdsp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- yoshida
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-09-
|
11
|
+
date: 2019-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|