MCPcopy Create free account
hub / github.com/OpenGene/fastp / initPrimeArrays

Method initPrimeArrays

src/duplicate.cpp:66–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void Duplicate::initPrimeArrays() {
67 uint64 number = 10000;
68 uint64 count = 0;
69 while(count < mBufNum * PRIME_ARRAY_LEN) {
70 number++;
71 bool isPrime = true;
72 for(uint64 i=2; i<=sqrt(number); i++) {
73 if(number%i == 0) {
74 isPrime = false;
75 break;
76 }
77 }
78 if(isPrime) {
79 mPrimeArrays[count] = number;
80 count++;
81 number += 10000;
82 }
83 }
84}
85
86Duplicate::~Duplicate(){
87 delete[] mDupBuf;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected