wavspa 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +14 -10
- data/ext/wavspa/fft/fft.c +2 -2
- data/ext/wavspa/wavelet/extconf.rb +24 -14
- data/lib/wavspa/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 105e6829219b0ac7ca493a4698636783bc680396b13ebaf2886ab2380fba3421
|
4
|
+
data.tar.gz: 28bc152456d4152b7c5b5fa60c39bff4513fa77b6193db90b13684e699acd9bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c6039a08506eb5155eb8c6d63aa23b7e3c475dc0293bad5e836db93e8aa2bfd97a7a243c41762dc5c12a2b0fc6bcada2c3e2fcf499eabbf547ef2f559c5d261
|
7
|
+
data.tar.gz: cb035d342c0d586df69b5f79fdfb06e0c7890e30b53f0c1e7c81ed695e174cb17f4559496dc453693b739cfdc9e2651fbbd5be5233708245337fd89cbf7958ab
|
data/README.md
CHANGED
@@ -22,6 +22,10 @@ This application uses OpenMP, but by default tries to link the libgomp. When usi
|
|
22
22
|
|
23
23
|
$ gem insatll wavspa -- --with-openmp ~/env/opts/lib --omp-name omp
|
24
24
|
|
25
|
+
if you not require OpenMP, specify the folowing option:
|
26
|
+
|
27
|
+
$ gem insatll wavspa -- --no-openmp
|
28
|
+
|
25
29
|
## Usage
|
26
30
|
|
27
31
|
### FFT analyzer
|
@@ -132,8 +136,8 @@ options:
|
|
132
136
|
-m, --scale-mode=STRING
|
133
137
|
-c, --col-steps=SIZE
|
134
138
|
--show-params
|
135
|
-
-F, --draw-freq-line
|
136
|
-
-T, --draw-time-line
|
139
|
+
-F, --no-draw-freq-line
|
140
|
+
-T, --no-draw-time-line
|
137
141
|
-v, --verbose
|
138
142
|
```
|
139
143
|
|
@@ -179,17 +183,17 @@ options:
|
|
179
183
|
<dt>--show-params</dt>
|
180
184
|
<dd>show sumarry of settings.</dd>
|
181
185
|
|
182
|
-
<dt>-F, --draw-freq-line</dt>
|
183
|
-
<dd>
|
186
|
+
<dt>-F, --no-draw-freq-line</dt>
|
187
|
+
<dd>disable frequency line (vertical grid).</dd>
|
184
188
|
|
185
|
-
<dt>-F, --draw-freq-line</dt>
|
186
|
-
<dd>
|
189
|
+
<dt>-F, --no-draw-freq-line</dt>
|
190
|
+
<dd>disable time line (horizontal grid).</dd>
|
187
191
|
|
188
|
-
|
189
|
-
|
192
|
+
<dt>-v, --verbose</dt>
|
193
|
+
<dd>enable verbose mode</dd>
|
190
194
|
|
191
|
-
|
192
|
-
|
195
|
+
<dt>-h, --help</dt>
|
196
|
+
<dd>show help message</dd>
|
193
197
|
</dl>
|
194
198
|
|
195
199
|
## Output example
|
data/ext/wavspa/fft/fft.c
CHANGED
@@ -816,10 +816,10 @@ fft_calc_power(fft_t* fft, double* dst)
|
|
816
816
|
}
|
817
817
|
|
818
818
|
for(j = 0, a = fft->a + (lc->pos * 2); j < lc->n; j++, a += 2) {
|
819
|
-
v +=
|
819
|
+
v += sqrt((a[0] * a[0]) + (a[1] * a[1]));
|
820
820
|
}
|
821
821
|
|
822
|
-
dst[i] = v / j;
|
822
|
+
dst[i] = v / (j * fq);
|
823
823
|
}
|
824
824
|
} while(0);
|
825
825
|
|
@@ -2,12 +2,18 @@ require 'mkmf'
|
|
2
2
|
require 'optparse'
|
3
3
|
require 'rbconfig'
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
omp_enable = true
|
6
|
+
omp_path = nil
|
7
|
+
omp_name = "gomp"
|
7
8
|
|
8
9
|
OptionParser.new { |opt|
|
9
|
-
opt.on("
|
10
|
-
|
10
|
+
opt.on("--[no-]openmp") { |flag|
|
11
|
+
omp_enable = flag
|
12
|
+
}
|
13
|
+
|
14
|
+
opt.on("--with-openmp=PATH", String) { |path|
|
15
|
+
omp_enable = true
|
16
|
+
omp_path = path
|
11
17
|
}
|
12
18
|
|
13
19
|
opt.on("--omp-name=NAME", String) { |name|
|
@@ -17,21 +23,25 @@ OptionParser.new { |opt|
|
|
17
23
|
opt.parse!(ARGV)
|
18
24
|
}
|
19
25
|
|
20
|
-
|
21
|
-
|
22
|
-
$CFLAGS << " -L#{omp_path}"
|
23
|
-
$LDFLAGS << " -L#{omp_path}"
|
26
|
+
if omp_enable
|
27
|
+
$CFLAGS << " -fopenmp"
|
24
28
|
|
25
|
-
|
26
|
-
|
27
|
-
$LDFLAGS << " -
|
29
|
+
if omp_path
|
30
|
+
$CFLAGS << " -L#{omp_path}"
|
31
|
+
$LDFLAGS << " -L#{omp_path}"
|
28
32
|
|
29
|
-
|
30
|
-
|
33
|
+
case RbConfig::CONFIG['arch']
|
34
|
+
when /-darwin/
|
35
|
+
$LDFLAGS << " -Wl,-rpath,#{omp_path}"
|
36
|
+
|
37
|
+
else
|
38
|
+
# nothing
|
39
|
+
end
|
31
40
|
end
|
41
|
+
|
42
|
+
have_library(omp_name)
|
32
43
|
end
|
33
44
|
|
34
45
|
have_library("m")
|
35
|
-
have_library(omp_name)
|
36
46
|
|
37
47
|
create_makefile( "wavspa/wavelet")
|
data/lib/wavspa/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wavspa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hirosho Kuwagata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-04-
|
11
|
+
date: 2019-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|