line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package cppAdaptive2 v3.0.1; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
49344
|
use strict; |
|
2
|
|
|
|
|
9
|
|
|
2
|
|
|
|
|
51
|
|
4
|
2
|
|
|
2
|
|
7
|
use warnings; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
89
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use cppAdaptive2::Inline( |
7
|
2
|
|
|
|
|
130
|
CPP => <<'CPP', |
8
|
|
|
|
|
|
|
#undef seed |
9
|
|
|
|
|
|
|
#undef do_open |
10
|
|
|
|
|
|
|
#undef do_close |
11
|
|
|
|
|
|
|
#undef open |
12
|
|
|
|
|
|
|
#undef read |
13
|
|
|
|
|
|
|
#undef write |
14
|
|
|
|
|
|
|
#undef close |
15
|
|
|
|
|
|
|
#undef bind |
16
|
|
|
|
|
|
|
#undef seekdir |
17
|
|
|
|
|
|
|
#undef setbuf |
18
|
|
|
|
|
|
|
#undef wait |
19
|
|
|
|
|
|
|
#undef PP |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
#include "cppAdaptive.cpp" |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
AV* _update(int threads, char* obsVector, char* futVector, char* betaVector, int n_observed) { |
24
|
|
|
|
|
|
|
string obsVector1(obsVector); |
25
|
|
|
|
|
|
|
string futVector1(futVector); |
26
|
|
|
|
|
|
|
string betaVector1(betaVector); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
cppAdaptive(threads, obsVector1, futVector1, betaVector1, n_observed); |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
AV* av = newAV(); |
31
|
|
|
|
|
|
|
sv_2mortal((SV*)av); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
av_push( av, newSVpv(betaVector1.c_str(), betaVector1.size()) ); |
34
|
|
|
|
|
|
|
av_push( av, newSVpv(futVector1.c_str(), futVector1.size()) ); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
return av; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
CPP |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
# without omp |
41
|
|
|
|
|
|
|
# inc => '-I../../../../src', |
42
|
|
|
|
|
|
|
# ccflags => '-std=c++11', |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# with omp |
45
|
|
|
|
|
|
|
inc => '-I../../../../src', |
46
|
|
|
|
|
|
|
ccflags => '-std=c++11 -fopenmp', |
47
|
|
|
|
|
|
|
lddlflags => '-shared -O2 -fstack-protector-strong -fopenmp', |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
clean_after_build => 0, |
50
|
|
|
|
|
|
|
clean_build_area => 0, |
51
|
2
|
|
|
2
|
|
562
|
); |
|
2
|
|
|
|
|
4
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub update { |
54
|
1
|
|
|
1
|
0
|
51
|
my ( $threads, $obsVector, $futVector, $betaVector, $n_observed ) = @_; |
55
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
2
|
return @{ _update( $threads, $obsVector, $futVector, $betaVector, $n_observed ) }; |
|
1
|
|
|
|
|
2011441
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
__END__ |