t17_TransformObufUlckFilBuf.cpp File Reference

#include <assert.h>
#include <stdlib.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
#include <vector>
#include <list>
#include <rpa/platforms.h>
#include <rpa/synchro.h>
#include <rpa/testing.h>
#include <rpa/containers/vector.h>
#include <rpa/containers/list.h>
#include <rpa/containers/row_iterator.h>
#include <rpa/containers/streambuf_tmpnam.h>
#include <rpa/containers/file_unlocker.h>
#include <rpa/testing_streambuf.h>
#include <rpa/algorithms/transform.h>

Classes

class  Flt2Int
class  TestBox< OutStrmBuf, TmpnamBuf >
class  t17_mkstemp< N >
struct  TestOut< TmpNamOutStrmBuf >

Typedefs

typedef float DataIn
 The input data type, in the input iterator.
typedef int DataOut
 This is stored in the ouput iterator.

Functions

int main (int aArgC, const char **aArgV)
 TestOut.

Variables

static const rpa::thr_nb_t myNbThr = ( ( 1 << 3 ) + 1 )
static rpa::testing_thread myThrTests [myNbThr]
static const size_t myMaxElts = 200000 * TST_RATIO
 Maximum number of input data.
static DataOut mySample [myMaxElts]
static DataIn myInputArr [myMaxElts]
static std::list< DataInmyInputLst

Typedef Documentation

typedef float DataIn

The input data type, in the input iterator.

Utilities, various things for testing with streambuf. Not needed for real programs.

typedef int DataOut

This is stored in the ouput iterator.


Function Documentation

int main ( int  aArgC,
const char **  aArgV 
)

TestOut.

Tries different types of per-thread buffers. Writes into different sorts of outputs, as long as they are streams. NOTE: We do not attempt to test obuf_iterator with a stream as buffer and a non-ostream_iterator_public output. It may make sense, I do not know yet.

At the end, it is compared against the algorithms output.

Fills the containers. The algorithm 'transform' will convert to an integer. The content will never be changed.

It is possible to use any kind of input container.


Variable Documentation

DataIn myInputArr[myMaxElts] [static]

These are the input container types. They are very big, and therefore not put on the stack.

std::list< DataIn > myInputLst [static]

It does not matter whether this input container is put on the stack or is a global variable, because its content is in allocated memory. It is just stored near the other input containers for clarity.

const size_t myMaxElts = 200000 * TST_RATIO [static]

Maximum number of input data.

const rpa::thr_nb_t myNbThr = ( ( 1 << 3 ) + 1 ) [static]

The maximum number of threads. Expressed as a power of two plus one, because of the way thread numbers are incremented in this test : multiplied by two at each loop.

DataOut mySample[myMaxElts] [static]

This contains the output results that each algorithm must calculate. This is tested with 'CmpStreams'.

rpa::testing_thread myThrTests[myNbThr] [static]

The threads must be global because we have no idea about when they are actually created or stopped. This contains a pool of threads we want to use.


Generated on Tue Sep 25 10:20:31 2007 for rpa by  doxygen 1.4.7