#include <pthread.h>
#include <iterator>
#include <vector>
#include <iostream>
#include <sstream>
#include <stdlib.h>
#include <math.h>
#include <algorithm>
#include <numeric>
#include <set>
#include <list>
#include <deque>
#include <rpa/common.h>
#include <rpa/iota_iterator.h>
#include <rpa/algorithms/remove_copy_if.h>
#include <rpa/containers/list.h>
#include <rpa/containers/deque.h>
#include <rpa/containers/vector.h>
#include <rpa/containers/pipeline.h>
Classes | |
struct | FunctorXXXX< int > |
Returns true if odd integer. More... | |
struct | FunctorXXXX< double > |
Returns true if square number. More... | |
struct | FunctorYYYY< int > |
Returns true if even integer. More... | |
struct | FunctorYYYY< double > |
Returns true if not square number. More... | |
Functions | |
template<class Container> | |
void | compare27 (const Container &refContA, const Container &refContB) |
Simple local comparison of algoritms results: Sequential vs parallel. | |
template<class InputRange, class OutputContainer, class Functor, class ThreadTree, class Mutex> | |
void | t27_removePlainPar (const std::set< typename InputRange::value_type > &setCmp, size_t nbEltsInp, const InputRange &inpRng, const Functor &objFunc, ThreadTree threadTree, Mutex &refMtx) |
Computes rpa::remove_copy_if into a plain iterator (Without insertion). | |
template<class InputContainer, class OutputContainer, class Functor, class ThreadTree, class Mutex> | |
void | t27_removePlain (const InputContainer &inpCont, ThreadTree threadTree, const Functor &objFunc, Mutex &refMtx) |
Computes sequential remove_copy_if, then parallel on several ranges. | |
template<class InputContainer, class OutputContainer, class ThreadTree, class Mutex> | |
void | t27_removeFunctor (const InputContainer &inpRng, ThreadTree threadTree, Mutex &refMtx) |
This iterates over several types of functors. | |
template<class InputContainer, class OutputContainer> | |
void | t27_removeThrMtx (const InputContainer &inpRng, rpa::thr_nb_t nbThrs) |
This iterates over several possible thread trees and mutexes. | |
template<class InputContainer> | |
void | t27_removeOutCont (const InputContainer &inpRng, rpa::thr_nb_t nbThrs) |
This tests on several types of output_container. | |
template<class SampleContainer> | |
void | t27_removeInCont (const SampleContainer &sampleCont, rpa::thr_nb_t nbThrs) |
Tests with several types of data samples. The container and the data vary. | |
template<class DataType> | |
void | t27_removeSamples (size_t nbElts, const DataType &initVal, rpa::thr_nb_t nbThrs) |
Does all the tests for a given number of elements. | |
static void | t27_removeData (size_t nbElts, rpa::thr_nb_t nbThrs) |
int | main (int aArgC, const char **aArgV) |
void compare27 | ( | const Container & | refContA, | |
const Container & | refContB | |||
) |
Simple local comparison of algoritms results: Sequential vs parallel.
Necessary because we need to know whether the iterators are invalidated when an insertion is done in the containers.
int main | ( | int | aArgC, | |
const char ** | aArgV | |||
) |
static void t27_removeData | ( | size_t | nbElts, | |
rpa::thr_nb_t | nbThrs | |||
) | [static] |
void t27_removeFunctor | ( | const InputContainer & | inpRng, | |
ThreadTree | threadTree, | |||
Mutex & | refMtx | |||
) |
This iterates over several types of functors.
void t27_removeInCont | ( | const SampleContainer & | sampleCont, | |
rpa::thr_nb_t | nbThrs | |||
) |
Tests with several types of data samples. The container and the data vary.
void t27_removeOutCont | ( | const InputContainer & | inpRng, | |
rpa::thr_nb_t | nbThrs | |||
) |
This tests on several types of output_container.
void t27_removePlain | ( | const InputContainer & | inpCont, | |
ThreadTree | threadTree, | |||
const Functor & | objFunc, | |||
Mutex & | refMtx | |||
) |
Computes sequential remove_copy_if, then parallel on several ranges.
void t27_removePlainPar | ( | const std::set< typename InputRange::value_type > & | setCmp, | |
size_t | nbEltsInp, | |||
const InputRange & | inpRng, | |||
const Functor & | objFunc, | |||
ThreadTree | threadTree, | |||
Mutex & | refMtx | |||
) |
Computes rpa::remove_copy_if into a plain iterator (Without insertion).
void t27_removeSamples | ( | size_t | nbElts, | |
const DataType & | initVal, | |||
rpa::thr_nb_t | nbThrs | |||
) |
Does all the tests for a given number of elements.
void t27_removeThrMtx | ( | const InputContainer & | inpRng, | |
rpa::thr_nb_t | nbThrs | |||
) |
This iterates over several possible thread trees and mutexes.