Go to the documentation of this file.
18 #ifndef __BIN_MPIPRIME_MPIPRIME_H
19 #define __BIN_MPIPRIME_MPIPRIME_H
Size m_cores
Total number of cores.
int m_id
MPI core identifier (rank) of the current process.
MpiPrime(int argc, char **argv)
Constructor.
virtual Result exec()
Execute the application.
Size m_numberEnd
Prime numbers array range end for this core.
Compute prime numbers using the Sieve of Eratosthenes algorithm.
Size m_numberStart
Prime numbers array range start for this core.
int m_mpiInitResult
Result of MPI initialization.
unsigned int Size
Any sane size indicator cannot go negative.
Result collect(int n, u8 *rootMap, u8 *map)
Collect prime number results.
Size m_numbersPerCore
Prime numbers calculated per core.
virtual Result initialize()
Initialize the application.
Calculate prime numbers in parallel.
Result searchParallel(int k, int n, u8 *rootMap, u8 *map)
Calculate prime numbers in parallel.
unsigned char u8
Unsigned 8-bit number.
virtual ~MpiPrime()
Destructor.