cumo 0.4.2 → 0.4.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 +4 -4
- data/CHANGELOG.md +7 -1
- data/ext/cumo/include/cumo.h +2 -2
- data/ext/cumo/narray/gen/tmpl/accum_index.c +8 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 922b6830ac7affeaab6a15db93f8b29bd88da6ea3b2901475774b3a701f1402d
|
4
|
+
data.tar.gz: ef1e39d3330540b1bf3257e2f2317c03e71a86549c49fd63e587ebdd51070b95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '019d31242d5da029164cb9587ce4e14ce5af4e6460846bdd0412dc0973951ddb308796f8ccc14b34a5258084cec57e73f0ae5b7839ce8888b69a991d78f9a064'
|
7
|
+
data.tar.gz: ef148c4bbe71f2c580227de8cc337134c6383fb00b010e919c704689bf3b8ef19b3a8bb04d8757d58eaaa3b797d70334be8af58acc257e5d924b56b997fc975b
|
data/CHANGELOG.md
CHANGED
data/ext/cumo/include/cumo.h
CHANGED
@@ -89,7 +89,7 @@ static VALUE
|
|
89
89
|
<% else %>
|
90
90
|
{
|
91
91
|
cumo_narray_t *na;
|
92
|
-
VALUE reduce;
|
92
|
+
VALUE reduce, ret;
|
93
93
|
cumo_ndfunc_arg_in_t ain[2] = {{Qnil,0},{cumo_sym_reduce,0}};
|
94
94
|
cumo_ndfunc_arg_out_t aout[1] = {{0,0,0}};
|
95
95
|
cumo_ndfunc_t ndf = {0, CUMO_STRIDE_LOOP_NIP|CUMO_NDF_FLAT_REDUCE|CUMO_NDF_EXTRACT|CUMO_NDF_INDEXER_LOOP, 2,1, ain,aout};
|
@@ -115,9 +115,14 @@ static VALUE
|
|
115
115
|
|
116
116
|
if (cumo_na_has_idx_p(self)) {
|
117
117
|
VALUE copy = cumo_na_copy(self); // reduction does not support idx, make conttiguous
|
118
|
-
|
118
|
+
ret = cumo_na_ndloop(&ndf, 2, copy, reduce);
|
119
119
|
} else {
|
120
|
-
|
120
|
+
ret = cumo_na_ndloop(&ndf, 2, self, reduce);
|
121
|
+
}
|
122
|
+
if (cumo_compatible_mode_enabled_p()) {
|
123
|
+
return rb_funcall(ret, rb_intern("extract_cpu"), 0);
|
124
|
+
} else {
|
125
|
+
return ret;
|
121
126
|
}
|
122
127
|
}
|
123
128
|
<% end %>
|