From 43387c81de38e3cdcafa703b53191b9d1a8b77d5 Mon Sep 17 00:00:00 2001 From: Mathias Labeyrie Date: Wed, 5 Nov 2014 15:05:33 +0100 Subject: [PATCH] test perf fastAcos --- test/gtx/gtx_fast_trigonometry.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp index ff65878b..0856dfc2 100644 --- a/test/gtx/gtx_fast_trigonometry.cpp +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -75,6 +75,27 @@ namespace fastTan{ } } +namespace fastAcos{ + int perf() + { + const float begin = -glm::pi(); + const float end = glm::pi(); + float result = 0.f; + const std::clock_t timestamp1 = std::clock(); + for (float i = begin; i(time_fast)); + std::printf("acos Time %d clocks\n", static_cast(time_default)); + return time_fast < time_default ? 0 : 1; + } +} + int main() { @@ -83,6 +104,7 @@ int main() Error += ::fastCos::perf(); Error += ::fastSin::perf(); Error += ::fastTan::perf(); + Error += ::fastAcos::perf(); return Error; }