Vector Optimized Library of Kernels  3.0.0
Architecture-tuned implementations of math kernels
qa_utils.cc File Reference
#include "qa_utils.h"
#include <volk/volk.h>
#include <volk/volk_malloc.h>
#include <assert.h>
#include <stdint.h>
#include <sys/time.h>
#include <sys/types.h>
#include <chrono>
#include <cmath>
#include <cstring>
#include <ctime>
#include <fstream>
#include <iostream>
#include <limits>
#include <map>
#include <random>
#include <vector>

Data Structures

class  volk_qa_aligned_mem_pool
 

Functions

template<typename T >
void random_floats (void *buf, unsigned int n, std::default_random_engine &rnd_engine)
 
void load_random_data (void *data, volk_type_t type, unsigned int n)
 
static std::vector< std::string > get_arch_list (volk_func_desc_t desc)
 
template<typename T >
volk_lexical_cast (const std::string &str)
 
volk_type_t volk_type_from_string (std::string name)
 
std::vector< std::string > split_signature (const std::string &protokernel_signature)
 
static void get_signatures_from_name (std::vector< volk_type_t > &inputsig, std::vector< volk_type_t > &outputsig, std::string name)
 
void run_cast_test1 (volk_fn_1arg func, std::vector< void * > &buffs, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test2 (volk_fn_2arg func, std::vector< void * > &buffs, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test3 (volk_fn_3arg func, std::vector< void * > &buffs, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test4 (volk_fn_4arg func, std::vector< void * > &buffs, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test1_s32f (volk_fn_1arg_s32f func, std::vector< void * > &buffs, float scalar, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test2_s32f (volk_fn_2arg_s32f func, std::vector< void * > &buffs, float scalar, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test3_s32f (volk_fn_3arg_s32f func, std::vector< void * > &buffs, float scalar, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test1_s32fc (volk_fn_1arg_s32fc func, std::vector< void * > &buffs, lv_32fc_t scalar, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test2_s32fc (volk_fn_2arg_s32fc func, std::vector< void * > &buffs, lv_32fc_t scalar, unsigned int vlen, unsigned int iter, std::string arch)
 
void run_cast_test3_s32fc (volk_fn_3arg_s32fc func, std::vector< void * > &buffs, lv_32fc_t scalar, unsigned int vlen, unsigned int iter, std::string arch)
 
template<class t >
bool fcompare (t *in1, t *in2, unsigned int vlen, float tol, bool absolute_mode)
 
template<class t >
bool ccompare (t *in1, t *in2, unsigned int vlen, float tol, bool absolute_mode)
 
template<class t >
bool icompare (t *in1, t *in2, unsigned int vlen, unsigned int tol, bool absolute_mode)
 
bool run_volk_tests (volk_func_desc_t desc, void(*manual_func)(), std::string name, volk_test_params_t test_params, std::vector< volk_test_results_t > *results, std::string puppet_master_name)
 
bool run_volk_tests (volk_func_desc_t desc, void(*manual_func)(), std::string name, float tol, lv_32fc_t scalar, unsigned int vlen, unsigned int iter, std::vector< volk_test_results_t > *results, std::string puppet_master_name, bool absolute_mode, bool benchmark_mode)
 

Function Documentation

◆ ccompare()

template<class t >
bool ccompare ( t *  in1,
t *  in2,
unsigned int  vlen,
float  tol,
bool  absolute_mode 
)

◆ fcompare()

template<class t >
bool fcompare ( t *  in1,
t *  in2,
unsigned int  vlen,
float  tol,
bool  absolute_mode 
)

◆ get_arch_list()

static std::vector<std::string> get_arch_list ( volk_func_desc_t  desc)
static

◆ get_signatures_from_name()

static void get_signatures_from_name ( std::vector< volk_type_t > &  inputsig,
std::vector< volk_type_t > &  outputsig,
std::string  name 
)
static

◆ icompare()

template<class t >
bool icompare ( t *  in1,
t *  in2,
unsigned int  vlen,
unsigned int  tol,
bool  absolute_mode 
)

◆ load_random_data()

void load_random_data ( void data,
volk_type_t  type,
unsigned int  n 
)

◆ random_floats()

template<typename T >
void random_floats ( void buf,
unsigned int  n,
std::default_random_engine &  rnd_engine 
)

◆ run_cast_test1()

void run_cast_test1 ( volk_fn_1arg  func,
std::vector< void * > &  buffs,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test1_s32f()

void run_cast_test1_s32f ( volk_fn_1arg_s32f  func,
std::vector< void * > &  buffs,
float  scalar,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test1_s32fc()

void run_cast_test1_s32fc ( volk_fn_1arg_s32fc  func,
std::vector< void * > &  buffs,
lv_32fc_t  scalar,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test2()

void run_cast_test2 ( volk_fn_2arg  func,
std::vector< void * > &  buffs,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test2_s32f()

void run_cast_test2_s32f ( volk_fn_2arg_s32f  func,
std::vector< void * > &  buffs,
float  scalar,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test2_s32fc()

void run_cast_test2_s32fc ( volk_fn_2arg_s32fc  func,
std::vector< void * > &  buffs,
lv_32fc_t  scalar,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test3()

void run_cast_test3 ( volk_fn_3arg  func,
std::vector< void * > &  buffs,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test3_s32f()

void run_cast_test3_s32f ( volk_fn_3arg_s32f  func,
std::vector< void * > &  buffs,
float  scalar,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test3_s32fc()

void run_cast_test3_s32fc ( volk_fn_3arg_s32fc  func,
std::vector< void * > &  buffs,
lv_32fc_t  scalar,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_cast_test4()

void run_cast_test4 ( volk_fn_4arg  func,
std::vector< void * > &  buffs,
unsigned int  vlen,
unsigned int  iter,
std::string  arch 
)
inline

◆ run_volk_tests() [1/2]

bool run_volk_tests ( volk_func_desc_t  desc,
void(*)()  manual_func,
std::string  name,
float  tol,
lv_32fc_t  scalar,
unsigned int  vlen,
unsigned int  iter,
std::vector< volk_test_results_t > *  results,
std::string  puppet_master_name,
bool  absolute_mode,
bool  benchmark_mode 
)

◆ run_volk_tests() [2/2]

bool run_volk_tests ( volk_func_desc_t  desc,
void(*)()  manual_func,
std::string  name,
volk_test_params_t  test_params,
std::vector< volk_test_results_t > *  results,
std::string  puppet_master_name 
)

◆ split_signature()

std::vector<std::string> split_signature ( const std::string &  protokernel_signature)

◆ volk_lexical_cast()

template<typename T >
T volk_lexical_cast ( const std::string &  str)

◆ volk_type_from_string()

volk_type_t volk_type_from_string ( std::string  name)