Ocean
Loading...
Searching...
No Matches
TestSLAM.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_TEST_TESTTRACKING_TESTSLAM_TESTSLAM_H
9#define META_OCEAN_TEST_TESTTRACKING_TESTSLAM_TESTSLAM_H
10
12
14
15#include "ocean/base/Worker.h"
16
17namespace Ocean
18{
19
20namespace Test
21{
22
23namespace TestTracking
24{
25
26namespace TestSLAM
27{
28
29/**
30 * @ingroup testtracking
31 * @defgroup testtrackingtestslam Ocean Test Tracking SLAM Library
32 * @{
33 * The Ocean Test Tracking SLAM Library provides several functions to test the performance and validation of the Ocean Tracking SLAM Library.
34 * The library is platform independent.
35 * @}
36 */
37
38/**
39 * @namespace Ocean::Test::TestTracking::TestSLAM Namespace of the SLAM Tracking Test library.<p>
40 * The Namespace Ocean::Test::TestTracking::TestSLAM is used in the entire Ocean SLAM Tracking Test Library.
41 */
42
43// Defines OCEAN_TEST_TRACKING_SLAM_EXPORT for dll export and import.
44#if defined(_WINDOWS) && defined(OCEAN_RUNTIME_SHARED)
45 #ifdef USE_OCEAN_TEST_TRACKING_SLAM_EXPORT
46 #define OCEAN_TEST_TRACKING_SLAM_EXPORT __declspec(dllexport)
47 #else
48 #define OCEAN_TEST_TRACKING_SLAM_EXPORT __declspec(dllimport)
49 #endif
50#else
51 #define OCEAN_TEST_TRACKING_SLAM_EXPORT
52#endif
53
54/**
55 * Tests the entire SLAM tracking library.
56 * @param testDuration Number of seconds for each test, with range (0, infinity)
57 * @param worker The worker object to distribute some computation on as many CPU cores as defined in the worker object.
58 * @param testFunctions Optional name of the functions to be tested
59 * @return True, if the entire test succeeded
60 * @ingroup testtrackingtestslam
61 */
62OCEAN_TEST_TRACKING_SLAM_EXPORT bool testSLAM(const double testDuration, Worker& worker, const std::string& testFunctions = std::string());
63
64/**
65 * Tests the entire SLAM tracking library.
66 * This function returns directly as the actual test is invoked in an own thread.<br>
67 * This function is intended for non-console applications like e.g., mobile devices.
68 * @param testDuration Number of seconds for each test, with range (0, infinity)
69 * @param testFunctions Optional name of the functions to be tested
70 * @ingroup testtrackingtestslam
71 */
72OCEAN_TEST_TRACKING_SLAM_EXPORT void testSLAMAsynchron(const double testDuration, const std::string& testFunctions = std::string());
73
74}
75
76}
77
78}
79
80}
81
82#endif // META_OCEAN_TEST_TESTTRACKING_TESTSLAM_TESTSLAM_H
This class implements a worker able to distribute function calls over different threads.
Definition Worker.h:33
OCEAN_TEST_TRACKING_SLAM_EXPORT void testSLAMAsynchron(const double testDuration, const std::string &testFunctions=std::string())
Tests the entire SLAM tracking library.
OCEAN_TEST_TRACKING_SLAM_EXPORT bool testSLAM(const double testDuration, Worker &worker, const std::string &testFunctions=std::string())
Tests the entire SLAM tracking library.
The namespace covering the entire Ocean framework.
Definition Accessor.h:15