line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package cppAdaptive2 v3.0.3; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
60031
|
use strict; |
|
2
|
|
|
|
|
12
|
|
|
2
|
|
|
|
|
49
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
100
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use cppAdaptive2::Inline( |
7
|
2
|
|
|
|
|
193
|
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( char* obsVector, char* futVector, char* betaVector, int n_observed ) { |
24
|
|
|
|
|
|
|
string obsVector1(obsVector); |
25
|
|
|
|
|
|
|
string futVector1(futVector); |
26
|
|
|
|
|
|
|
string betaVector1(betaVector); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
cppAdaptive( 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 -O3', |
47
|
|
|
|
|
|
|
lddlflags => '-shared -O3 -fstack-protector-strong -fopenmp', |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
clean_after_build => 0, |
50
|
|
|
|
|
|
|
clean_build_area => 0, |
51
|
2
|
|
|
2
|
|
656
|
); |
|
2
|
|
|
|
|
4
|
|
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub update { |
54
|
1
|
|
|
1
|
0
|
80
|
my ( $obsVector, $futVector, $betaVector, $n_observed ) = @_; |
55
|
|
|
|
|
|
|
|
56
|
1
|
|
|
|
|
2
|
return @{ _update( $obsVector, $futVector, $betaVector, $n_observed ) }; |
|
1
|
|
|
|
|
10544429
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
1; |
60
|
|
|
|
|
|
|
__END__ |