#include <assert.h>
#include <stdlib.h>
#include <string>
#include <sstream>
#include <vector>
#include <algorithm>
#include <rpa/algorithms/accumulate.h>
#include <rpa/istream_iterator_delimiter.h>
#include <rpa/testing.h>
Namespaces | |
namespace | rpa |
Classes | |
struct | rpa::atomic< string_vector_const_iter_t > |
struct | rpa::atomic< string_vector_iter_t > |
struct | rpa::cas1< string_vector_const_iter_t > |
struct | rpa::cas1< string_vector_iter_t > |
Defines | |
#define | NB_THR 10 |
Tests the algorithm 'accumulate' with strings. | |
#define | NB_SAMPLES ( 100000 * TST_RATIO ) |
Functions | |
static void | Check (const string &aRes) |
The input vector must be sorted. | |
typedef | rpa::RPA_VECTOR_ITERATOR_CONST (string, std::allocator< string >) string_vector_const_iter_t |
typedef | rpa::RPA_VECTOR_ITERATOR (string, std::allocator< string >) string_vector_iter_t |
int | main (int aArgC, const char **aArgV) |
Variables | |
static rpa::testing_thread | myThr [NB_THR] |
Our thread pool. The threads are actually created by the algorithm. | |
static const char * | sttDelim = "=" |
#define NB_SAMPLES ( 100000 * TST_RATIO ) |
#define NB_THR 10 |
Tests the algorithm 'accumulate' with strings.
static void Check | ( | const string & | aRes | ) | [static] |
The input vector must be sorted.
int main | ( | int | aArgC, | |
const char ** | aArgV | |||
) |
The input set is a container of strings. The algorithm will concatenate these strings. The order of the result may vary. The strings can be separated, so it is possible to later check whether all strings are in the results.
First builds the input sample.
rpa::testing_thread myThr[NB_THR] [static] |
Our thread pool. The threads are actually created by the algorithm.
const char* sttDelim = "=" [static] |