MRPT  1.9.9
cpu_unittest.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2020, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include <gtest/gtest.h>
11 #include <mrpt/core/cpu.h>
12 
14 {
15  const std::string s = mrpt::cpu::features_as_string();
16  std::cout << "CPU features: " << s << "\n";
17 
18  EXPECT_GT(s.size(), 10UL);
19 }
20 
22 {
23  // Test that, at least, it does not crash.
24  // We cannot test against any known value since the result is CPU-dependant
26  (void)r;
27 }
EXPECT_GT(out.final_iters, 10UL)
bool supports(feature f) noexcept
Returns true if CPU (and OS) supports the given CPU feature, and that instruction set or feature was ...
Definition: cpu.h:77
std::string features_as_string() noexcept
Returns a string with detected features: "MMX:1 SSE2:0 etc.".
Definition: cpu.cpp:117
TEST(cpu, features_as_string)



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 3a26b90fd Wed Mar 25 20:17:03 2020 +0100 at miƩ mar 25 23:05:41 CET 2020