Logo ROOT   6.07/09
Reference Guide
Enumerations | Functions | Variables
stressVdt.cxx File Reference
#include <vector>
#include <iostream>
#include <cmath>
#include <assert.h>
#include <limits>
#include <iomanip>
#include <map>
#include <string>
#include "vdt/vdtMath.h"
#include "TStopwatch.h"
#include "TRandom3.h"
#include "TH1F.h"
#include "TCanvas.h"
#include "TError.h"
Include dependency graph for stressVdt.cxx:

Enumerations

enum  rangeType {
  kReal, kExp, kExpf, kRealPlus,
  km1p1
}
 

Functions

template<typename T , typename F >
void calculateValues (F mathFunc, const std::vector< T > &inputVector, std::vector< T > &outputVector)
 
void checkFunction (const std::string &label, float, uint32_t maxdiffBit)
 
template<typename T , typename F1 , typename F2 >
void compareFunctions (const std::string &label, F1 vdtFunc, F2 systemFunc, const std::vector< T > &inputVector, std::vector< T > &outputVectorVDT, std::vector< T > &outputVectorSystem, float &speedup, uint32_t &maxdiffBit, TH1F &histo)
 
template<typename T >
void compareOutputs (const std::vector< T > &inputVector1, const std::vector< T > &inputVector2, std::vector< uint32_t > &outputVector)
 
template<class T >
uint32_t diffbit (const T a, const T b)
 Returns most significative different bit. More...
 
void dpStep1 ()
 
void dpStep2 ()
 
void dpStep3 ()
 
template<typename T >
void fillRandom (std::vector< T > &randomV, const rangeType theRangeType)
 
template<class T >
uint64_t fp2uint (T)
 
template<>
uint64_t fp2uint< double > (double x)
 
template<>
uint64_t fp2uint< float > (float x)
 
double isqrt (double x)
 
float isqrtf (float x)
 
int main ()
 
template<typename T , typename F >
double measureTiming (F mathFunc, const std::vector< T > &inputVector, std::vector< T > &outputVector)
 
void spStep1 ()
 
void spStep2 ()
 
void spStep3 ()
 
template<typename T >
void treatBinDiffHisto (TH1F &histo, const std::vector< T > &VDTVals, const std::vector< T > &SystemVals)
 

Variables

struct staticInitHelper gbl
 
const double RANGE =3000.
 Simple program to benchmark vdt accuracy and cpu performance. More...
 
const uint32_t SIZE = 16777216
 

Enumeration Type Documentation

enum rangeType
Enumerator
kReal 
kExp 
kExpf 
kRealPlus 
km1p1 

Definition at line 91 of file stressVdt.cxx.

Function Documentation

template<typename T , typename F >
void calculateValues ( F  mathFunc,
const std::vector< T > &  inputVector,
std::vector< T > &  outputVector 
)
inline

Definition at line 60 of file stressVdt.cxx.

void checkFunction ( const std::string &  label,
float  ,
uint32_t  maxdiffBit 
)

Definition at line 260 of file stressVdt.cxx.

template<typename T , typename F1 , typename F2 >
void compareFunctions ( const std::string &  label,
F1  vdtFunc,
F2  systemFunc,
const std::vector< T > &  inputVector,
std::vector< T > &  outputVectorVDT,
std::vector< T > &  outputVectorSystem,
float &  speedup,
uint32_t &  maxdiffBit,
TH1F histo 
)
inline

Definition at line 207 of file stressVdt.cxx.

template<typename T >
void compareOutputs ( const std::vector< T > &  inputVector1,
const std::vector< T > &  inputVector2,
std::vector< uint32_t > &  outputVector 
)

Definition at line 76 of file stressVdt.cxx.

template<class T >
uint32_t diffbit ( const T  a,
const T  b 
)
inline

Returns most significative different bit.

Definition at line 47 of file stressVdt.cxx.

void dpStep1 ( )

Definition at line 339 of file stressVdt.cxx.

void dpStep2 ( )

Definition at line 363 of file stressVdt.cxx.

void dpStep3 ( )

Definition at line 380 of file stressVdt.cxx.

template<typename T >
void fillRandom ( std::vector< T > &  randomV,
const rangeType  theRangeType 
)

Definition at line 98 of file stressVdt.cxx.

template<class T >
uint64_t fp2uint ( )

Definition at line 26 of file stressVdt.cxx.

template<>
uint64_t fp2uint< double > ( double  x)

Definition at line 33 of file stressVdt.cxx.

template<>
uint64_t fp2uint< float > ( float  x)

Definition at line 39 of file stressVdt.cxx.

double isqrt ( double  x)
inline

Definition at line 273 of file stressVdt.cxx.

float isqrtf ( float  x)
inline

Definition at line 272 of file stressVdt.cxx.

int main ( )

Definition at line 398 of file stressVdt.cxx.

template<typename T , typename F >
double measureTiming ( F  mathFunc,
const std::vector< T > &  inputVector,
std::vector< T > &  outputVector 
)
inline

Definition at line 135 of file stressVdt.cxx.

void spStep1 ( )

Definition at line 280 of file stressVdt.cxx.

void spStep2 ( )

Definition at line 305 of file stressVdt.cxx.

void spStep3 ( )

Definition at line 322 of file stressVdt.cxx.

template<typename T >
void treatBinDiffHisto ( TH1F histo,
const std::vector< T > &  VDTVals,
const std::vector< T > &  SystemVals 
)

Definition at line 118 of file stressVdt.cxx.

Variable Documentation

struct staticInitHelper gbl
const double RANGE =3000.

Simple program to benchmark vdt accuracy and cpu performance.

Definition at line 20 of file stressVdt.cxx.

const uint32_t SIZE = 16777216

Definition at line 21 of file stressVdt.cxx.