int main(void) { out.assign(0.f); in.assign(0.2f); in2.assign(0.3f); const unsigned int iterations = 50000000; run_bench(boost::bind(bench_1, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); run_bench(boost::bind(bench_2, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); #ifdef __SSE__ run_bench(boost::bind(bench_3, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); run_bench(boost::bind(bench_3a, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); #endif run_bench(boost::bind(bench_4, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); run_bench(boost::bind(bench_5, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); #ifdef __SSE__ run_bench(boost::bind(bench_6, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); run_bench(boost::bind(bench_6a, out.begin(), in.begin(), 0.1f, 0.001f, 64), iterations); #endif }
void __noinline__ bench_5(unsigned int numSamples) { clip_vec_simd<float>(out.begin(), wrap_argument(in.begin()), wrap_argument(-0.5f), wrap_argument(0.5f), numSamples); }