diff options
author | Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> | 2015-10-20 13:18:59 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@theqtcompany.com> | 2015-10-22 10:08:51 +0000 |
commit | 31f9c57bc50ae053cfaf039a1dfdb128e2494458 (patch) | |
tree | 316138cb73c49877f5a80a8496c2f1b737122fb5 /tests/manual/spectrum/3rdparty/fftreal/TestHelperNormal.hpp | |
parent | 4162ddeb02ee41fd4217d7f3d93d45cab3313ba8 (diff) |
Fix issues with COIN builds
-Fix miscellaneous compile errors
-Move manual tests to manual folder and enable export of autotests
-Added widgets requirement
-Fixed autotests
-Fixed renderer and controller synchronization in QML case
-Treat fallback Mesa as ES2 similar to setting AA_UseSoftwareOpenGL
Change-Id: If6619733725d079e339bef16262e5ea1450ab20f
Reviewed-by: Tomi Korpipää <tomi.korpipaa@theqtcompany.com>
Diffstat (limited to 'tests/manual/spectrum/3rdparty/fftreal/TestHelperNormal.hpp')
-rw-r--r-- | tests/manual/spectrum/3rdparty/fftreal/TestHelperNormal.hpp | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/tests/manual/spectrum/3rdparty/fftreal/TestHelperNormal.hpp b/tests/manual/spectrum/3rdparty/fftreal/TestHelperNormal.hpp new file mode 100644 index 00000000..e037696a --- /dev/null +++ b/tests/manual/spectrum/3rdparty/fftreal/TestHelperNormal.hpp @@ -0,0 +1,99 @@ +/***************************************************************************** + + TestHelperNormal.hpp + Copyright (c) 2005 Laurent de Soras + +--- Legal stuff --- + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*Tab=3***********************************************************************/ + + + +#if defined (TestHelperNormal_CURRENT_CODEHEADER) + #error Recursive inclusion of TestHelperNormal code header. +#endif +#define TestHelperNormal_CURRENT_CODEHEADER + +#if ! defined (TestHelperNormal_CODEHEADER_INCLUDED) +#define TestHelperNormal_CODEHEADER_INCLUDED + + + +/*\\\ INCLUDE FILES \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ + +#include "test_settings.h" + +#include "TestAccuracy.h" +#if defined (test_settings_SPEED_TEST_ENABLED) + #include "TestSpeed.h" +#endif + + + +/*\\\ PUBLIC \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ + + + +template <class DT> +void TestHelperNormal <DT>::perform_test_accuracy (int &ret_val) +{ + const int len_arr [] = { 1, 2, 3, 4, 7, 8, 10, 12 }; + const int nbr_len = sizeof (len_arr) / sizeof (len_arr [0]); + for (int k = 0; k < nbr_len && ret_val == 0; ++k) + { + const long len = 1L << (len_arr [k]); + FftType fft (len); + ret_val = TestAccuracy <FftType>::perform_test_single_object (fft); + } +} + + + +template <class DT> +void TestHelperNormal <DT>::perform_test_speed (int &ret_val) +{ +#if defined (test_settings_SPEED_TEST_ENABLED) + + const int len_arr [] = { 1, 2, 3, 4, 7, 8, 10, 12, 14, 16, 18, 20, 22 }; + const int nbr_len = sizeof (len_arr) / sizeof (len_arr [0]); + for (int k = 0; k < nbr_len && ret_val == 0; ++k) + { + const long len = 1L << (len_arr [k]); + FftType fft (len); + ret_val = TestSpeed <FftType>::perform_test_single_object (fft); + } + +#endif +} + + + +/*\\\ PROTECTED \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ + + + +/*\\\ PRIVATE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ + + + +#endif // TestHelperNormal_CODEHEADER_INCLUDED + +#undef TestHelperNormal_CURRENT_CODEHEADER + + + +/*\\\ EOF \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/ |