line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Math::Prime::FastSieve; |
2
|
|
|
|
|
|
|
|
3
|
7
|
|
|
7
|
|
332693
|
use 5.006000; |
|
7
|
|
|
|
|
27
|
|
|
7
|
|
|
|
|
320
|
|
4
|
7
|
|
|
7
|
|
43
|
use strict; |
|
7
|
|
|
|
|
22
|
|
|
7
|
|
|
|
|
453
|
|
5
|
7
|
|
|
7
|
|
46
|
use warnings; |
|
7
|
|
|
|
|
19
|
|
|
7
|
|
|
|
|
1205
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
require Exporter; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our @ISA = qw(Exporter); ## no critic (isa) |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
our @EXPORT_OK = qw( primes ); # We can export primes(). |
12
|
|
|
|
|
|
|
our @EXPORT = qw( ); # Export nothing by default. |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = '0.19'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
use Inline |
17
|
7
|
|
|
|
|
62
|
CPP => 'DATA', |
18
|
|
|
|
|
|
|
VERSION => '0.19', |
19
|
7
|
|
|
7
|
|
29525
|
NAME => 'Math::Prime::FastSieve'; |
|
7
|
|
|
|
|
358652
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# No real code here. Everything is implemented in pure C++ using |
23
|
|
|
|
|
|
|
# Inline::CPP. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# I've grown tired of mistyping isprime() as is_prime(). |
26
|
|
|
|
|
|
|
*Math::Prime::FastSieve::Sieve::is_prime |
27
|
|
|
|
|
|
|
= \&Math::Prime::FastSieve::Sieve::isprime; |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
# This should prevent M51 warnings from being generated by Inline if a user |
31
|
|
|
|
|
|
|
# 'require's Math::Prime::FastSieve instead of 'use'. |
32
|
|
|
|
|
|
|
END { |
33
|
7
|
|
|
7
|
|
3138709
|
Inline->init(); |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
1; |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
__DATA__ |