From c357c47be8a3f210f9eee9a05cc13f1051b036d3 Mon Sep 17 00:00:00 2001 From: Alex Gilday Date: Wed, 21 Mar 2018 13:54:09 +0000 Subject: COMPMID-1008: Fix Doxygen issues Change-Id: Ie73d8771f85d1f5b059f3a56f1bbd73c98e94a38 Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124723 Reviewed-by: Michalis Spyrou Tested-by: Jenkins --- tests/framework/instruments/Instrument.h | 16 +++++++++++++--- tests/framework/instruments/MaliCounter.h | 9 +++++++-- tests/framework/instruments/Measurement.h | 13 +++++++++++++ tests/framework/instruments/OpenCLTimer.h | 6 +++++- tests/framework/instruments/PMU.h | 10 ++++++++-- tests/framework/instruments/PMUCounter.h | 6 +++++- tests/framework/instruments/SchedulerTimer.h | 12 +++++++++++- tests/framework/instruments/WallClockTimer.h | 6 +++++- tests/framework/instruments/hwc.hpp | 7 ++++++- tests/framework/instruments/hwc_names.hpp | 7 ++++++- 10 files changed, 79 insertions(+), 13 deletions(-) (limited to 'tests/framework/instruments') diff --git a/tests/framework/instruments/Instrument.h b/tests/framework/instruments/Instrument.h index e25939a284..0df53f4210 100644 --- a/tests/framework/instruments/Instrument.h +++ b/tests/framework/instruments/Instrument.h @@ -57,13 +57,19 @@ public: template static std::unique_ptr make_instrument(); + /** Default constructor. */ Instrument() = default; + /** Allow instances of this class to be copy constructed */ Instrument(const Instrument &) = default; - Instrument(Instrument &&) = default; + /** Allow instances of this class to be move constructed */ + Instrument(Instrument &&) = default; + /** Allow instances of this class to be copied */ Instrument &operator=(const Instrument &) = default; + /** Allow instances of this class to be moved */ Instrument &operator=(Instrument &&) = default; - virtual ~Instrument() = default; + /** Default destructor. */ + virtual ~Instrument() = default; /** Identifier for the instrument */ virtual std::string id() const = 0; @@ -74,9 +80,13 @@ public: /** Stop measuring. */ virtual void stop() = 0; + /** Map of measurements */ using MeasurementsMap = std::map; - /** Return the latest measurement. */ + /** Return the latest measurement. + * + * @return the latest measurement. + */ virtual MeasurementsMap measurements() const = 0; protected: diff --git a/tests/framework/instruments/MaliCounter.h b/tests/framework/instruments/MaliCounter.h index b7c3483817..a3cc446cb2 100644 --- a/tests/framework/instruments/MaliCounter.h +++ b/tests/framework/instruments/MaliCounter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -41,10 +41,15 @@ namespace framework class MaliCounter : public Instrument { public: - /** Default constructor. */ + /** Default constructor. + * + * @param[in] scale_factor Measurement scale factor; + */ MaliCounter(ScaleFactor scale_factor); + /** Prevent instances of this class from being copy constructed */ MaliCounter(const MaliCounter &) = delete; + /** Prevent instances of this class from being copied */ MaliCounter &operator=(const MaliCounter &) = delete; /** Default destructor */ diff --git a/tests/framework/instruments/Measurement.h b/tests/framework/instruments/Measurement.h index 1beacf6cc5..5c62977b91 100644 --- a/tests/framework/instruments/Measurement.h +++ b/tests/framework/instruments/Measurement.h @@ -40,6 +40,7 @@ namespace framework /** Generic measurement that stores values as either double or long long int. */ struct Measurement { + /** Measurement value */ struct Value { /** Constructor @@ -187,6 +188,13 @@ struct Measurement } } + /** Get the relative standard deviation to a given distribution as a percentage. + * + * @param[in] variance The variance of the distribution. + * @param[in] mean The mean of the distribution. + * + * @return the relative standard deviation. + */ static double relative_standard_deviation(const Value &variance, const Value &mean) { if(variance.is_floating_point) @@ -222,6 +230,11 @@ struct Measurement /** Stream output operator to print the measurement. * * Prints value and unit. + * + * @param[out] os Output stream. + * @param[in] measurement Measurement. + * + * @return the modified output stream. */ friend inline std::ostream &operator<<(std::ostream &os, const Measurement &measurement) { diff --git a/tests/framework/instruments/OpenCLTimer.h b/tests/framework/instruments/OpenCLTimer.h index a3dc107bf8..44578782ed 100644 --- a/tests/framework/instruments/OpenCLTimer.h +++ b/tests/framework/instruments/OpenCLTimer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -42,6 +42,10 @@ namespace framework class OpenCLTimer : public Instrument { public: + /** Construct an OpenCL timer. + * + * @param[in] scale_factor Measurement scale factor. + */ OpenCLTimer(ScaleFactor scale_factor); std::string id() const override; void start() override; diff --git a/tests/framework/instruments/PMU.h b/tests/framework/instruments/PMU.h index c069a6366b..1dc41bef51 100644 --- a/tests/framework/instruments/PMU.h +++ b/tests/framework/instruments/PMU.h @@ -64,10 +64,16 @@ public: template T get_value() const; - /** Open the specified counter based on the default configuration. */ + /** Open the specified counter based on the default configuration. + * + * @param[in] config The default configuration. + */ void open(uint64_t config); - /** Open the specified configuration. */ + /** Open the specified configuration. + * + * @param[in] perf_config The specified configuration. + */ void open(const perf_event_attr &perf_config); /** Close the currently open counter. */ diff --git a/tests/framework/instruments/PMUCounter.h b/tests/framework/instruments/PMUCounter.h index e1b9433eda..0719b10864 100644 --- a/tests/framework/instruments/PMUCounter.h +++ b/tests/framework/instruments/PMUCounter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,6 +37,10 @@ namespace framework class PMUCounter : public Instrument { public: + /** Construct a PMU counter. + * + * @param[in] scale_factor Measurement scale factor. + */ PMUCounter(ScaleFactor scale_factor) { switch(scale_factor) diff --git a/tests/framework/instruments/SchedulerTimer.h b/tests/framework/instruments/SchedulerTimer.h index 446506ad73..ec282cc905 100644 --- a/tests/framework/instruments/SchedulerTimer.h +++ b/tests/framework/instruments/SchedulerTimer.h @@ -38,13 +38,23 @@ namespace framework class SchedulerTimer : public Instrument { public: + /** Construct a Scheduler timer. + * + * @param[in] scale_factor Measurement scale factor. + */ + SchedulerTimer(ScaleFactor scale_factor); + + /** Prevent instances of this class from being copy constructed */ SchedulerTimer(const SchedulerTimer &) = delete; + /** Prevent instances of this class from being copied */ SchedulerTimer &operator=(const SchedulerTimer &) = delete; - SchedulerTimer(ScaleFactor scale_factor); + std::string id() const override; void start() override; void stop() override; Instrument::MeasurementsMap measurements() const override; + + /** Kernel information */ struct kernel_info { Instrument::MeasurementsMap measurements{}; /**< Time it took the kernel to run */ diff --git a/tests/framework/instruments/WallClockTimer.h b/tests/framework/instruments/WallClockTimer.h index 468f4d3a8f..c9829aea12 100644 --- a/tests/framework/instruments/WallClockTimer.h +++ b/tests/framework/instruments/WallClockTimer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -38,6 +38,10 @@ namespace framework class WallClockTimer : public Instrument { public: + /** Construct a Wall clock timer. + * + * @param[in] scale_factor Measurement scale factor. + */ WallClockTimer(ScaleFactor scale_factor) { switch(scale_factor) diff --git a/tests/framework/instruments/hwc.hpp b/tests/framework/instruments/hwc.hpp index 3607ef574e..8c48e0ca45 100644 --- a/tests/framework/instruments/hwc.hpp +++ b/tests/framework/instruments/hwc.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -37,6 +37,8 @@ #include #include +#ifndef DOXYGEN_SKIP_THIS + #if defined(ANDROID) || defined(__ANDROID__) /* We use _IOR_BAD/_IOW_BAD rather than _IOR/_IOW otherwise fails to compile with NDK-BUILD because of _IOC_TYPECHECK is defined, not because the paramter is invalid */ #define MALI_IOR(a, b, c) _IOR_BAD(a, b, c) @@ -387,4 +389,7 @@ static inline int mali_ioctl(int fd, T &arg) return 0; } } // namespace mali_userspace + +#endif /* DOXYGEN_SKIP_THIS */ + #endif /* ARM_COMPUTE_TEST_HWC */ diff --git a/tests/framework/instruments/hwc_names.hpp b/tests/framework/instruments/hwc_names.hpp index ffc19b56e5..cbcb0e788e 100644 --- a/tests/framework/instruments/hwc_names.hpp +++ b/tests/framework/instruments/hwc_names.hpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -24,6 +24,8 @@ #ifndef ARM_COMPUTE_TEST_HWC_NAMES #define ARM_COMPUTE_TEST_HWC_NAMES +#ifndef DOXYGEN_SKIP_THIS + namespace mali_userspace { enum MaliCounterBlockName @@ -3056,4 +3058,7 @@ enum NUM_PRODUCTS = sizeof(products) / sizeof(products[0]) }; } // namespace mali_userspace + +#endif /* DOXYGEN_SKIP_THIS */ + #endif /* ARM_COMPUTE_TEST_HWC_NAMES */ -- cgit v1.2.1