narray_ffi 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/ext/narray_ffi_c/extconf.rb +1 -1
- data/lib/narray_ffi.rb +1 -2
- data/narray_ffi.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 721a24211495ce94483138eb689880ec4ab659650738d8a6a8710c1de924a88c
|
4
|
+
data.tar.gz: 91f9a5614528d2a660ea82a650fe16b71a455828914451cb3089841f2ff34425
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20d06d641b2870014242f55037ceedb319fe4517bf992bf9812d77c4f028d953e054b5a633c023bd4729eac420aaba3cc70343c11c92cab8f4851dac5ff75b54
|
7
|
+
data.tar.gz: 0fc6ab638484f39cf54be0fa7fe5f0c839759ffbe3b5c8c9c987c20d9beaaa19a0390607ae8b4417741add953ef9e421c828fa2f82abe4019bce260a0d3d36f1
|
data/ext/narray_ffi_c/extconf.rb
CHANGED
data/lib/narray_ffi.rb
CHANGED
@@ -17,8 +17,7 @@ class ANArray < NArray
|
|
17
17
|
def self.new(typecode, alignment, *size)
|
18
18
|
raise "Wrong type code" if not FFITYPECODES[typecode]
|
19
19
|
raise "Invalid alignment" unless alignment > 0 and ( alignment & (alignment - 1) == 0 )
|
20
|
-
total = size
|
21
|
-
size[1..-1].each { |sz| total = total * sz }
|
20
|
+
total = size.reduce(:*)
|
22
21
|
total = 2*total if typecode == NArray::COMPLEX or typecode == NArray::SCOMPLEX
|
23
22
|
mem = FFI::MemoryPointer::new( FFITYPECODES[typecode], total + alignment - 1 )
|
24
23
|
address = mem.address
|
data/narray_ffi.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: narray_ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brice Videau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: narray
|
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
82
|
version: '0'
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
|
-
rubygems_version: 2.
|
85
|
+
rubygems_version: 2.7.6
|
86
86
|
signing_key:
|
87
87
|
specification_version: 4
|
88
88
|
summary: Ruby narray_ffi
|