hornetseye-linalg 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/config.rb +1 -1
  3. data/ext/node.cc +6 -6
  4. metadata +3 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9f8f3da84b9c5d4dc1f0ab945df09c817b988fa7
4
- data.tar.gz: dd5ad39f7a8ac1bfe191f5807ae69e49406c4446
3
+ metadata.gz: 57ea65067f4e2f4ab2598f57afba40d46144ae58
4
+ data.tar.gz: 90661c623493a8ca4f8ef6440f035a48403bfbee
5
5
  SHA512:
6
- metadata.gz: 4e294461728547295a8452e6f2de62b9b3df90ab61963359ea205d0e17ea7c52e07a130854eeaff28b9a894df17f9a267b7126e860518ab3993a84b61b276713
7
- data.tar.gz: 265f84b11412f8ac157d81a81c08973e70eefa18c3d0ddeb521ab982f6f447950815d9f95f5625a7eacf77317b68bdc2bb3325568b644e3cc69f14f72c61326c
6
+ metadata.gz: 26760bed0fcbf0f03e3518623d5ab900f2036f528faab058e1c2e5e07e2359976ebc4efa39303eab23c513b7bcdef0bc600bb05813aa065cc088f1b2947843db
7
+ data.tar.gz: cdd51e8724006e12710a60860d94c66cc6c62c4fa03fa50b4e94632508597f138cd2355cf033c9a4eb0f8afec25823555a535125e89b884ac13852e27a50f4b5
data/config.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'rake'
2
2
 
3
3
  PKG_NAME = 'hornetseye-linalg'
4
- PKG_VERSION = '1.0.3'
4
+ PKG_VERSION = '1.0.4'
5
5
  CFG = RbConfig::CONFIG
6
6
  CXX = ENV[ 'CXX' ] || 'g++'
7
7
  RB_FILES = ['config.rb'] + FileList[ 'lib/**/*.rb' ]
@@ -48,15 +48,15 @@ VALUE Node::wrapToDMatrix(VALUE rbSelf)
48
48
  "Array needs to have two dimensions for conversion to "
49
49
  "DMatrix (but had " << rank << " dimension(s))");
50
50
  int
51
- width = NUM2INT(RARRAY_PTR(rbShape)[0]),
52
- height = NUM2INT(RARRAY_PTR(rbShape)[1]);
51
+ width = NUM2INT(rb_ary_entry(rbShape, 0)),
52
+ height = NUM2INT(rb_ary_entry(rbShape, 1));
53
53
  ERRORMACRO(rb_funcall(rbTypecode, rb_intern("=="), 1,
54
54
  rb_const_get(mModule, rb_intern("DFLOAT"))) == Qtrue, Error, ,
55
55
  "Element-type of array must be DFLOAT");
56
56
  VALUE cMalloc = rb_define_class_under(mModule, "Malloc", rb_cObject);
57
57
  unsigned char *source;
58
58
  dataGetStruct(rbMalloc, cMalloc, unsigned char, source);
59
- VALUE rbLinalg = rb_define_module("Linalg");
59
+ rb_define_module("Linalg");
60
60
  DMatrix_ *dmatrix = (DMatrix_ *)ALLOC(DMatrix_);
61
61
  dmatrix->hsize = height;
62
62
  dmatrix->vsize = width;
@@ -81,15 +81,15 @@ VALUE Node::wrapToSMatrix(VALUE rbSelf)
81
81
  "Array needs to have two dimensions for conversion to "
82
82
  "SMatrix (but had " << rank << " dimension(s))");
83
83
  int
84
- width = NUM2INT(RARRAY_PTR(rbShape)[0]),
85
- height = NUM2INT(RARRAY_PTR(rbShape)[1]);
84
+ width = NUM2INT(rb_ary_entry(rbShape, 0)),
85
+ height = NUM2INT(rb_ary_entry(rbShape, 1));
86
86
  ERRORMACRO(rb_funcall(rbTypecode, rb_intern("=="), 1,
87
87
  rb_const_get(mModule, rb_intern("SFLOAT"))) == Qtrue, Error, ,
88
88
  "Element-type of array must be SFLOAT");
89
89
  VALUE cMalloc = rb_define_class_under(mModule, "Malloc", rb_cObject);
90
90
  unsigned char *source;
91
91
  dataGetStruct(rbMalloc, cMalloc, unsigned char, source);
92
- VALUE rbLinalg = rb_define_module("Linalg");
92
+ rb_define_module("Linalg");
93
93
  SMatrix_ *smatrix = (SMatrix_ *)ALLOC(SMatrix_);
94
94
  smatrix->hsize = height;
95
95
  smatrix->vsize = width;
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hornetseye-linalg
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Wedekind
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2016-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: malloc
@@ -103,10 +103,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project: hornetseye
106
- rubygems_version: 2.4.6
106
+ rubygems_version: 2.5.1
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Linalg integration for Hornetseye
110
110
  test_files:
111
111
  - test/tc_hornetseye_linalg.rb
112
- has_rdoc: yard