libmf 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +1 -1
- data/lib/libmf.rb +5 -3
- data/lib/libmf/model.rb +3 -2
- data/lib/libmf/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e654382e818f1b59bc4437e71bc3e0ae6f4d4d79b9c85aeb53fb3494b2baf888
|
4
|
+
data.tar.gz: 560fa519794c7cd8b29c27b9ac9f4247e0485e9f13f229c18a4562c8bee62868
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d16fb17f9b58cea5c53814a68fbf9de91440fd77e1669b52bbe5cb3a3837c94449d8bbc348405c0c117f219d2a513f1fc2e813b330ea127c93ac04a0c4101d07
|
7
|
+
data.tar.gz: 3d5d3962d3878fe992f76ef9d2fa5e30866d007cd5ae3ab97a666fc53f97f9f3f2487bb425e15b59becde6118c61ecac6c8511692742d64efa2b9e26fe0d2872
|
data/CHANGELOG.md
CHANGED
data/LICENSE.txt
CHANGED
data/lib/libmf.rb
CHANGED
@@ -14,10 +14,12 @@ module Libmf
|
|
14
14
|
lib_name =
|
15
15
|
if Gem.win_platform?
|
16
16
|
"mf.dll"
|
17
|
-
elsif RbConfig::CONFIG["arch"] =~ /arm64-darwin/i
|
18
|
-
"libmf.arm64.dylib"
|
19
17
|
elsif RbConfig::CONFIG["host_os"] =~ /darwin/i
|
20
|
-
"
|
18
|
+
if RbConfig::CONFIG["host_cpu"] =~ /arm/i
|
19
|
+
"libmf.arm64.dylib"
|
20
|
+
else
|
21
|
+
"libmf.dylib"
|
22
|
+
end
|
21
23
|
else
|
22
24
|
"libmf.so"
|
23
25
|
end
|
data/lib/libmf/model.rb
CHANGED
@@ -111,10 +111,11 @@ module Libmf
|
|
111
111
|
|
112
112
|
# TODO do in C for better performance
|
113
113
|
# can use FIX2INT() and RFLOAT_VALUE() instead of pack
|
114
|
+
# and write directly to C string
|
114
115
|
buffer = String.new
|
116
|
+
pack_format = "iif"
|
115
117
|
data.each do |row|
|
116
|
-
row
|
117
|
-
row[2, 1].pack("f".freeze, buffer: buffer)
|
118
|
+
row.pack(pack_format, buffer: buffer)
|
118
119
|
end
|
119
120
|
|
120
121
|
r = ::FFI::MemoryPointer.new(FFI::Node, data.size)
|
data/lib/libmf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libmf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -25,7 +25,7 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description:
|
28
|
-
email: andrew@
|
28
|
+
email: andrew@ankane.org
|
29
29
|
executables: []
|
30
30
|
extensions: []
|
31
31
|
extra_rdoc_files: []
|