multiarray 0.11.0 → 0.11.2
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.
- data/Rakefile +1 -1
- data/lib/multiarray/gcccontext.rb +16 -14
- data/lib/multiarray/gcctype.rb +1 -1
- data/lib/multiarray/lookup.rb +3 -3
- metadata +3 -3
data/Rakefile
CHANGED
@@ -19,13 +19,18 @@ module Hornetseye
|
|
19
19
|
|
20
20
|
class GCCContext
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
"-
|
28
|
-
|
22
|
+
CFG = RbConfig::CONFIG
|
23
|
+
if CFG[ 'rubyhdrdir' ]
|
24
|
+
CFLAGS = "-DNDEBUG #{CFG[ 'CFLAGS' ]} " +
|
25
|
+
"-I#{CFG['rubyhdrdir']} -I#{CFG['rubyhdrdir']}/#{CFG['arch']}"
|
26
|
+
else
|
27
|
+
CFLAGS = "-DNDEBUG #{CFG[ 'CFLAGS' ]} " +
|
28
|
+
"-I#{CFG['archdir']}"
|
29
|
+
end
|
30
|
+
LIBRUBYARG = "-L#{CFG[ 'libdir' ]} #{CFG[ 'LIBRUBYARG' ]} #{CFG[ 'LDFLAGS' ]} "
|
31
|
+
"#{CFG[ 'SOLIBS' ]} #{CFG[ 'DLDLIBS' ]}"
|
32
|
+
LDSHARED = CFG[ 'LDSHARED' ]
|
33
|
+
DLEXT = CFG[ 'DLEXT' ]
|
29
34
|
DIRNAME = "#{Dir.tmpdir}/hornetseye-ruby#{RUBY_VERSION}-" +
|
30
35
|
"#{ENV[ 'USER' ] || ENV[ 'USERNAME' ]}"
|
31
36
|
LOCKFILE = "#{DIRNAME}/lock"
|
@@ -38,8 +43,8 @@ module Hornetseye
|
|
38
43
|
@@lib_name = 'hornetseye_aaaaaaaa'
|
39
44
|
|
40
45
|
if ENV[ 'HORNETSEYE_PRELOAD_CACHE' ]
|
41
|
-
while File.exist? "#{DIRNAME}/#{@@lib_name}
|
42
|
-
require "#{DIRNAME}/#{@@lib_name}
|
46
|
+
while File.exist? "#{DIRNAME}/#{@@lib_name}.#{DLEXT}"
|
47
|
+
require "#{DIRNAME}/#{@@lib_name}"
|
43
48
|
@@lib_name = @@lib_name.succ
|
44
49
|
end
|
45
50
|
end
|
@@ -128,14 +133,11 @@ EOS
|
|
128
133
|
File.open "#{DIRNAME}/#{@lib_name}.c", 'w', 0600 do |f|
|
129
134
|
f << template
|
130
135
|
end
|
131
|
-
gcc = "#{LDSHARED} -
|
132
|
-
"-o #{DIRNAME}/#{@lib_name}.so " +
|
136
|
+
gcc = "#{LDSHARED} #{CFLAGS} -o #{DIRNAME}/#{@lib_name}.#{DLEXT} " +
|
133
137
|
"#{DIRNAME}/#{@lib_name}.c #{LIBRUBYARG}"
|
134
|
-
strip = "#{STRIP} #{DIRNAME}/#{@lib_name}.so"
|
135
138
|
# puts template
|
136
139
|
raise "Error compiling #{DIRNAME}/#{@lib_name}.c" unless system gcc
|
137
|
-
|
138
|
-
require "#{DIRNAME}/#{@lib_name}.so"
|
140
|
+
require "#{DIRNAME}/#{@lib_name}"
|
139
141
|
end
|
140
142
|
|
141
143
|
def <<( str )
|
data/lib/multiarray/gcctype.rb
CHANGED
data/lib/multiarray/lookup.rb
CHANGED
@@ -30,9 +30,9 @@ module Hornetseye
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def memory
|
33
|
-
if array_type.storage_size != @stride.get * typecode.storage_size
|
34
|
-
|
35
|
-
end
|
33
|
+
#if array_type.storage_size != @stride.get * typecode.storage_size
|
34
|
+
# raise 'Memory is not contiguous'
|
35
|
+
#end
|
36
36
|
@p.memory
|
37
37
|
end
|
38
38
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 11
|
8
|
-
-
|
9
|
-
version: 0.11.
|
8
|
+
- 2
|
9
|
+
version: 0.11.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jan Wedekind
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-10-
|
17
|
+
date: 2010-10-27 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|