#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 | compare28 (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 | t28_removeBackInsPar (const std::set< typename InputRange::value_type > &setCmp, const InputRange &inpRng, const Functor &objFunc, ThreadTree threadTree, Mutex &refMtx) |
Computes rpa::remove_copy_if with std::back_inserter, checks the result. | |
template<class InputContainer, class OutputContainer, class Functor, class ThreadTree, class Mutex> | |
void | t28_removeBackIns (const InputContainer &inpCont, ThreadTree threadTree, const Functor &objFunc, Mutex &refMtx) |
Computes std::remove_copy_if with a back inserter, then on several ranges. | |
template<class InputContainer, class OutputContainer, class ThreadTree, class Mutex> | |
void | t28_removeFunctor (const InputContainer &inpRng, ThreadTree threadTree, Mutex &refMtx) |
This iterates over several types of functors. | |
template<class InputContainer, class OutputContainer> | |
void | t28_removeThrMtx (const InputContainer &inpRng, rpa::thr_nb_t nbThrs) |
This iterates over several possible thread trees and mutexes. | |
template<class InputContainer> | |
void | t28_removeOutCont (const InputContainer &inpRng, rpa::thr_nb_t nbThrs) |
This tests on several types of output_container. | |
template<class SampleContainer> | |
void | t28_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 | t28_removeSamples (size_t nbElts, const DataType &initVal, rpa::thr_nb_t nbThrs) |
Does all the tests for a given number of elements. | |
static void | t28_removeData (size_t nbElts, rpa::thr_nb_t nbThrs) |
int | main (int aArgC, const char **aArgV) |
void compare28 | ( | 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 | |||
) |
void t28_removeBackIns | ( | const InputContainer & | inpCont, | |
ThreadTree | threadTree, | |||
const Functor & | objFunc, | |||
Mutex & | refMtx | |||
) |
Computes std::remove_copy_if with a back inserter, then on several ranges.
void t28_removeBackInsPar | ( | const std::set< typename InputRange::value_type > & | setCmp, | |
const InputRange & | inpRng, | |||
const Functor & | objFunc, | |||
ThreadTree | threadTree, | |||
Mutex & | refMtx | |||
) |
Computes rpa::remove_copy_if with std::back_inserter, checks the result.
static void t28_removeData | ( | size_t | nbElts, | |
rpa::thr_nb_t | nbThrs | |||
) | [static] |
void t28_removeFunctor | ( | const InputContainer & | inpRng, | |
ThreadTree | threadTree, | |||
Mutex & | refMtx | |||
) |
This iterates over several types of functors.
void t28_removeInCont | ( | const SampleContainer & | sampleCont, | |
rpa::thr_nb_t | nbThrs | |||
) |
Tests with several types of data samples. The container and the data vary.
void t28_removeOutCont | ( | const InputContainer & | inpRng, | |
rpa::thr_nb_t | nbThrs | |||
) |
This tests on several types of output_container.
void t28_removeSamples | ( | size_t | nbElts, | |
const DataType & | initVal, | |||
rpa::thr_nb_t | nbThrs | |||
) |
Does all the tests for a given number of elements.
void t28_removeThrMtx | ( | const InputContainer & | inpRng, | |
rpa::thr_nb_t | nbThrs | |||
) |
This iterates over several possible thread trees and mutexes.