Logo ROOT   6.08/07
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

◆ rangeType

enum rangeType
Enumerator
kReal 
kExp 
kExpf 
kRealPlus 
km1p1 

Definition at line 91 of file stressVdt.cxx.

Function Documentation

◆ calculateValues()

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.

◆ checkFunction()

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

Definition at line 260 of file stressVdt.cxx.

◆ compareFunctions()

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.

◆ compareOutputs()

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.

◆ diffbit()

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.

◆ dpStep1()

void dpStep1 ( )

Definition at line 339 of file stressVdt.cxx.

◆ dpStep2()

void dpStep2 ( )

Definition at line 363 of file stressVdt.cxx.

◆ dpStep3()

void dpStep3 ( )

Definition at line 380 of file stressVdt.cxx.

◆ fillRandom()

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

Definition at line 98 of file stressVdt.cxx.

◆ fp2uint()

template<class T >
uint64_t fp2uint ( )

Definition at line 26 of file stressVdt.cxx.

◆ fp2uint< double >()

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

Definition at line 33 of file stressVdt.cxx.

◆ fp2uint< float >()

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

Definition at line 39 of file stressVdt.cxx.

◆ isqrt()

double isqrt ( double  x)
inline

Definition at line 273 of file stressVdt.cxx.

◆ isqrtf()

float isqrtf ( float  x)
inline

Definition at line 272 of file stressVdt.cxx.

◆ main()

int main ( )

Definition at line 398 of file stressVdt.cxx.

◆ measureTiming()

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.

◆ spStep1()

void spStep1 ( )

Definition at line 280 of file stressVdt.cxx.

◆ spStep2()

void spStep2 ( )

Definition at line 305 of file stressVdt.cxx.

◆ spStep3()

void spStep3 ( )

Definition at line 322 of file stressVdt.cxx.

◆ treatBinDiffHisto()

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

◆ gbl

struct staticInitHelper gbl

◆ RANGE

const double RANGE =3000.

Simple program to benchmark vdt accuracy and cpu performance.

Definition at line 20 of file stressVdt.cxx.

◆ SIZE

const uint32_t SIZE = 16777216

Definition at line 21 of file stressVdt.cxx.