summaryrefslogtreecommitdiff
path: root/libs/endian/test/speed_test_functions.hpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@baserock.org>2015-04-08 03:09:47 +0000
committer <>2015-05-05 14:37:32 +0000
commitf2541bb90af059680aa7036f315f052175999355 (patch)
treea5b214744b256f07e1dc2bd7273035a7808c659f /libs/endian/test/speed_test_functions.hpp
parented232fdd34968697a68783b3195b1da4226915b5 (diff)
downloadboost-tarball-master.tar.gz
Imported from /home/lorry/working-area/delta_boost-tarball/boost_1_58_0.tar.bz2.HEADboost_1_58_0master
Diffstat (limited to 'libs/endian/test/speed_test_functions.hpp')
-rw-r--r--libs/endian/test/speed_test_functions.hpp56
1 files changed, 56 insertions, 0 deletions
diff --git a/libs/endian/test/speed_test_functions.hpp b/libs/endian/test/speed_test_functions.hpp
new file mode 100644
index 000000000..df1634f73
--- /dev/null
+++ b/libs/endian/test/speed_test_functions.hpp
@@ -0,0 +1,56 @@
+// speed_test_functions.hpp ----------------------------------------------------------//
+
+// Copyright Beman Dawes 2013
+
+// Distributed under the Boost Software License, Version 1.0.
+// http://www.boost.org/LICENSE_1_0.txt
+
+//--------------------------------------------------------------------------------------//
+
+// These functions are separately compiled partially to defeat optimizers and
+// partially to create a worst case scenario. They are in a user namespace for
+// a bit of realism.
+
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_ENDIAN_SPEED_TEST_FUNCTIONS_HPP
+#define BOOST_ENDIAN_SPEED_TEST_FUNCTIONS_HPP
+
+#include <boost/cstdint.hpp>
+#include <boost/endian/arithmetic.hpp>
+
+namespace user
+{
+ using namespace boost;
+ using namespace boost::endian;
+
+ int16_t return_x_big_int16(int16_t x, big_int16_t y) BOOST_NOEXCEPT;
+ int16_t return_x_little_int16(int16_t x, little_int16_t y) BOOST_NOEXCEPT;
+ int16_t return_x_value_big_int16(int16_t x, big_int16_t) BOOST_NOEXCEPT;
+ int16_t return_x_value_little_int16(int16_t x, little_int16_t y) BOOST_NOEXCEPT;
+ int16_t return_x_inplace_big_int16(int16_t x, big_int16_t y) BOOST_NOEXCEPT;
+ int16_t return_x_inplace_little_int16(int16_t x, little_int16_t y) BOOST_NOEXCEPT;
+ int16_t return_y_big_int16(int16_t x, big_int16_t y) BOOST_NOEXCEPT;
+ int16_t return_y_little_int16(int16_t x, little_int16_t y) BOOST_NOEXCEPT;
+
+ int32_t return_x_big_int32(int32_t x, big_int32_t y) BOOST_NOEXCEPT;
+ int32_t return_x_little_int32(int32_t x, little_int32_t y) BOOST_NOEXCEPT;
+ int32_t return_x_value_big_int32(int32_t x, big_int32_t) BOOST_NOEXCEPT;
+ int32_t return_x_value_little_int32(int32_t x, little_int32_t y) BOOST_NOEXCEPT;
+ int32_t return_x_inplace_big_int32(int32_t x, big_int32_t y) BOOST_NOEXCEPT;
+ int32_t return_x_inplace_little_int32(int32_t x, little_int32_t y) BOOST_NOEXCEPT;
+ int32_t return_y_big_int32(int32_t x, big_int32_t y) BOOST_NOEXCEPT;
+ int32_t return_y_little_int32(int32_t x, little_int32_t y) BOOST_NOEXCEPT;
+
+ int64_t return_x_big_int64(int64_t x, big_int64_t y) BOOST_NOEXCEPT;
+ int64_t return_x_little_int64(int64_t x, little_int64_t y) BOOST_NOEXCEPT;
+ int64_t return_x_value_big_int64(int64_t x, big_int64_t) BOOST_NOEXCEPT;
+ int64_t return_x_value_little_int64(int64_t x, little_int64_t y) BOOST_NOEXCEPT;
+ int64_t return_x_inplace_big_int64(int64_t x, big_int64_t y) BOOST_NOEXCEPT;
+ int64_t return_x_inplace_little_int64(int64_t x, little_int64_t y) BOOST_NOEXCEPT;
+ int64_t return_y_big_int64(int64_t x, big_int64_t y) BOOST_NOEXCEPT;
+ int64_t return_y_little_int64(int64_t x, little_int64_t y) BOOST_NOEXCEPT;
+
+}
+
+#endif