Baseline Flop Count Update, New Float Baseline
This commit is contained in:
committed by
Ahmed Kallala
parent
40f4421d60
commit
43e54871df
@@ -0,0 +1,105 @@
|
||||
#pragma once
|
||||
#include <cmath>
|
||||
#include <new>
|
||||
|
||||
//
|
||||
// $\frac{1}{\tau_{\alpha}}$; $\tau_{\alpha} = 0.5s$
|
||||
//
|
||||
const float tau_alpha_inv = 2.0;
|
||||
|
||||
// $V^0_{\alpha \beta}$
|
||||
const float V0_AB = 2.1;
|
||||
|
||||
// $\sigma$
|
||||
const float SIGMA = 0.3;
|
||||
|
||||
//
|
||||
// $\frac{-1}{2\sigma}$
|
||||
//
|
||||
const float NEG_TWO_SIGMA_INV = -1.0 / (2 * SIGMA);
|
||||
|
||||
//
|
||||
// $\frac{-V^0_{\alpha\beta}}{2\sigma}$
|
||||
//
|
||||
const float NEG_V0_AB_div_TWO_SIGMA = V0_AB * NEG_TWO_SIGMA_INV;
|
||||
|
||||
// $U^0_{\alpha B}$
|
||||
const float U0_AB = 10.0;
|
||||
|
||||
// $R$
|
||||
const float R = 0.2;
|
||||
|
||||
//
|
||||
// $\frac{-1}{R}$
|
||||
//
|
||||
const float NEG_R_INV = -1.0 / R;
|
||||
|
||||
//
|
||||
// $\frac{-U^0_{\alpha B}}{R}$
|
||||
//
|
||||
const float NEG_U0_AB_div_R = -U0_AB / R;
|
||||
|
||||
// $-c$
|
||||
const float c_neg = -0.5;
|
||||
|
||||
// $\varphi$
|
||||
const float phi = 100.0 / 180.0 * M_PI;
|
||||
|
||||
// $cos(\varphi)$
|
||||
const float cos_phi = cos(phi);
|
||||
|
||||
//
|
||||
// $\frac{1}{cos(\varphi)}$
|
||||
//
|
||||
const float cos_phi_inv = 1 / cos(phi);
|
||||
|
||||
// $<v^0>$
|
||||
const float v0_mean = 1.34;
|
||||
|
||||
// $\sqrt{\theta}$
|
||||
const float v0_std_dev = 0.26;
|
||||
|
||||
// $\varDelta_{t}$
|
||||
const float delta_t = 2;
|
||||
|
||||
// $\varDelta_{t}^2$
|
||||
const float delta_t_sq = delta_t * delta_t;
|
||||
|
||||
// $dt$
|
||||
const float dt = 0.02;
|
||||
|
||||
// $-dt$
|
||||
const float dt_neg = -dt;
|
||||
|
||||
// $-c \cdot dt$
|
||||
const float c_neg_times_dt = c_neg * dt;
|
||||
|
||||
//
|
||||
// $\frac{1}{\tau_{\alpha}} \cdot dt$
|
||||
//
|
||||
const float dt_times_tau_alpha_inv = dt * tau_alpha_inv;
|
||||
|
||||
const float cost_add = 1;
|
||||
const float cost_mult = 1;
|
||||
const float cost_div = 1;
|
||||
|
||||
// https://acl.inf.ethz.ch/teaching/fastcode/knowledgebase/#:~:text=How%20do%20exp(x)%2C%20sin(x)%2C%20etc.%20count%20in%20the%20flopcount%20of%20an%20algorithm%3F
|
||||
const float cost_exp = 30;
|
||||
|
||||
// -O3 maps each sqrt() call to an instruction
|
||||
const float cost_sqrt = 1;
|
||||
|
||||
// Numerical tolerance used to avoid division by zero and unstable operations
|
||||
// when distances or norms are extremely small.
|
||||
const float EPS = 1e-9;
|
||||
|
||||
// Squared numerical tolerance
|
||||
const float EPS_SQ = EPS * EPS;
|
||||
|
||||
// Cutoff for pedestrian-pedestrian repulsion
|
||||
const float CUTOFF = 12.0;
|
||||
const float CUTOFF_SQ = CUTOFF * CUTOFF;
|
||||
|
||||
const float cos_phi_sq = cos_phi * cos_phi;
|
||||
|
||||
const size_t CACHE_BLOCK_SIZE = std::hardware_destructive_interference_size;
|
||||
Reference in New Issue
Block a user