HiRep 0.1
|
utilities to simplify testing More...
#include "libhr_core.h"
#include "timing.h"
Go to the source code of this file.
Macros | |
#define | synchronize cudaDeviceSynchronize(); |
#define | gpu_copy(_s) |
#define | cpu_copy(_s) |
#define | maxnorm(_s) |
#define | twonorm(_s) |
#define | _FIELD_DESC(_s1) |
#define | sanity_check(_n, _s) |
#define | compare_cpu_cpu(_errors, _out, _diff, _tag, _precision) |
#define | compare_cpu_gpu(_errors, _out, _diff, _tag, _precision) |
Compare two spinor fields in the cpu and gpu parts of out by comparing the MAX and L2 norm. | |
#define | setup_random_fields_m(_n, _s) |
#define | _TEST_CPU_INV_OP(_errors, _name, _ninputs, _in, _out, _test, _tag, _precision) |
#define | _TEST_RED_INV_OP(_errors, _name, _ninputs, _in, _out, _test, _tag, _precision) |
#define | _TEST_GPU_OP(_errors, _name, _ninputs, _in, _out, _test, _tag, _prec) |
#define | _TEST_RED_OP(_errors, _name, _ninputs, _in, _test, _tag, _prec) |
#define | _WARMUP_SPEEDTEST(_clock, _n_warmup, _time_target, _n_reps, _operator) |
#define | _RUN_SPEEDTEST(_clock, _n_warmup, _time_target, _n_reps, _flopsite, _bytesite, _operator) |
Functions | |
double | spinor_max (suNf_spinor *s) |
float | spinor_max_flt (suNf_spinor_flt *s) |
double | spinor_field_findmax_f (spinor_field *in) |
float | spinor_field_findmax_f_flt (spinor_field_flt *in) |
void | compare_diff (int errors, double abs1, double abs2, char tag[], double prec) |
Check if the two inputs are the same within a given relative precision of EPSILON. | |
void | compare_diff_flt (int errors, float abs1, float abs2) |
void | evaluate_timer_resolution (Timer clock) |
void | setup_random_fields (int n, spinor_field s[]) |
void | setup_random_fields_flt (int n, spinor_field_flt s[]) |
void | spinor_field_sanity_check (int ninputs, spinor_field *in) |
void | spinor_field_sanity_check_flt (int ninputs, spinor_field_flt *in) |
void | setup_random_gauge_fields () |
void | setup_clover () |
void | test_setup () |
int | check_diff_norm (double, double) |
int | check_diff_norm_zero (double) |
int | check_finiteness (double) |
void | random_spinor_field_cpu (spinor_field *) |
void | random_spinor_field_flt_cpu (spinor_field_flt *) |
void | random_suNg_field_cpu (suNg_field *) |
void | random_suNf_field_cpu (suNf_field *) |
void | random_suNfc_field_cpu (suNfc_field *) |
void | random_suNg_field_flt_cpu (suNg_field_flt *) |
void | random_suNf_field_flt_cpu (suNf_field_flt *) |
void | random_suNg_scalar_field_cpu (suNg_scalar_field *) |
void | random_suNg_av_field_cpu (suNg_av_field *) |
void | random_scalar_field_cpu (scalar_field *) |
void | random_gtransf_cpu (gtransf *) |
void | random_ldl_field_cpu (ldl_field *) |
void | random_clover_term_cpu (clover_term *) |
void | random_clover_force_cpu (clover_force *) |
void | random_staple_field_cpu (staple_field *) |
utilities to simplify testing
#define _FIELD_DESC | ( | _s1 | ) |
#define _RUN_SPEEDTEST | ( | _clock, | |
_n_warmup, | |||
_time_target, | |||
_n_reps, | |||
_flopsite, | |||
_bytesite, | |||
_operator ) |
#define _TEST_CPU_INV_OP | ( | _errors, | |
_name, | |||
_ninputs, | |||
_in, | |||
_out, | |||
_test, | |||
_tag, | |||
_precision ) |
#define _TEST_GPU_OP | ( | _errors, | |
_name, | |||
_ninputs, | |||
_in, | |||
_out, | |||
_test, | |||
_tag, | |||
_prec ) |
#define _TEST_RED_INV_OP | ( | _errors, | |
_name, | |||
_ninputs, | |||
_in, | |||
_out, | |||
_test, | |||
_tag, | |||
_precision ) |
#define _TEST_RED_OP | ( | _errors, | |
_name, | |||
_ninputs, | |||
_in, | |||
_test, | |||
_tag, | |||
_prec ) |
#define _WARMUP_SPEEDTEST | ( | _clock, | |
_n_warmup, | |||
_time_target, | |||
_n_reps, | |||
_operator ) |
#define compare_cpu_cpu | ( | _errors, | |
_out, | |||
_diff, | |||
_tag, | |||
_precision ) |
#define compare_cpu_gpu | ( | _errors, | |
_out, | |||
_diff, | |||
_tag, | |||
_precision ) |
Compare two spinor fields in the cpu and gpu parts of out by comparing the MAX and L2 norm.
out | Input spinor_field. Th function compare its cpu and gpu parts |
diff | Additional spinor_field used for scratch work space |
#define cpu_copy | ( | _s | ) |
#define gpu_copy | ( | _s | ) |
#define maxnorm | ( | _s | ) |
#define sanity_check | ( | _n, | |
_s ) |
#define setup_random_fields_m | ( | _n, | |
_s ) |
#define twonorm | ( | _s | ) |
void compare_diff | ( | int | errors, |
double | abs1, | ||
double | abs2, | ||
char | tag[], | ||
double | precision ) |
Check if the two inputs are the same within a given relative precision of EPSILON.
abs1 | |
abs2 |
void setup_random_fields_flt | ( | int | n, |
spinor_field_flt | s[] ) |
Generates an array of gaussian spinor fields and copy the results in the gpu memory