.. _program_listing_file_include_tests_highway_Test.cpp: Program Listing for File highway_Test.cpp ========================================= |exhale_lsh| :ref:`Return to documentation for file ` (``include/tests/highway_Test.cpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #include // #include #include #include #include // HWY_BEFORE_NAMESPACE(); // namespace HWY_NAMESPACE { namespace hn = hwy::HWY_NAMESPACE; #define SIZE_V 16 * 10000000 #include int main() { std::vector normal(SIZE_V); // std::vector> hwy_vec(SIZE_V); std::vector hwy_vec(SIZE_V); auto normal_time = clock(); for (int i = 0; i < normal.size(); ++i) { normal[i] += 10; } auto normal_result = clock() - normal_time; const hn::ScalableTag d; auto laneSz = hn::Lanes(d); auto times = hwy_vec.size() / laneSz; auto remained = hwy_vec.size() % laneSz; auto optr = hwy_vec.data(); auto Va = hn::Set(d, 10.0f); // std::vector ThrdP; // for(int i=0; i