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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4886418f8fc62df52cc7b235e755e2d7733221b39d46f2f68e25a1ee49923487
4
- data.tar.gz: 7476161b95f04d560397d6d2d6abf64bfbf9987a10559ea90e66fa12275075bb
3
+ metadata.gz: 922b6830ac7affeaab6a15db93f8b29bd88da6ea3b2901475774b3a701f1402d
4
+ data.tar.gz: ef1e39d3330540b1bf3257e2f2317c03e71a86549c49fd63e587ebdd51070b95
5
5
  SHA512:
6
- metadata.gz: 543fc92511dc863926f970ff23d811fc7975d182b74f11053ace504e68a6fd70b607c132a46bdf6f9396131560885d92a91a8c91544e0524d6a3cad12b3cdb64
7
- data.tar.gz: 610458caead3fef458aba25384ad817ff27e727f01d3452d165332163b93c64b14934b7d9546c942fc60920d63e6fb5e745180c1c69ad6ee0d2f96f3d8a9887b
6
+ metadata.gz: '019d31242d5da029164cb9587ce4e14ce5af4e6460846bdd0412dc0973951ddb308796f8ccc14b34a5258084cec57e73f0ae5b7839ce8888b69a991d78f9a064'
7
+ data.tar.gz: ef148c4bbe71f2c580227de8cc337134c6383fb00b010e919c704689bf3b8ef19b3a8bb04d8757d58eaaa3b797d70334be8af58acc257e5d924b56b997fc975b
@@ -1,4 +1,10 @@
1
- # 0.4.2 (2019-01-11)
1
+ # 0.4.3 (2019-06-11)
2
+
3
+ Fixes:
4
+
5
+ * Fix max|min\_index to behave like numo with CUMO\_COMPATIBLE\_MODE=ON
6
+
7
+ # 0.4.2 (2019-06-11)
2
8
 
3
9
  Fixes:
4
10
 
@@ -10,8 +10,8 @@ extern "C" {
10
10
  #endif
11
11
  #endif
12
12
 
13
- #define CUMO_VERSION "0.4.2"
14
- #define CUMO_VERSION_CODE 42
13
+ #define CUMO_VERSION "0.4.3"
14
+ #define CUMO_VERSION_CODE 43
15
15
 
16
16
  bool cumo_compatible_mode_enabled_p();
17
17
  bool cumo_show_warning_enabled_p();
@@ -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
- return cumo_na_ndloop(&ndf, 2, copy, reduce);
118
+ ret = cumo_na_ndloop(&ndf, 2, copy, reduce);
119
119
  } else {
120
- return cumo_na_ndloop(&ndf, 2, self, reduce);
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 %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cumo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.2
4
+ version: 0.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Naotoshi Seo