diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/statistics.hpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/statistics.hpp index 655b8ba56b..1913ebde1e 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/statistics.hpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/statistics.hpp @@ -50,12 +50,12 @@ public: static_assert(std::is_arithmetic::value, "only supports arithmetic types"); public: - inline statistics() = default; - inline ~statistics() = default; - inline statistics(const statistics&) = default; - inline statistics(statistics&&) noexcept = default; - inline statistics& operator=(const statistics&) = default; - inline statistics& operator=(statistics&&) noexcept = default; + statistics() = default; + ~statistics() = default; + statistics(const statistics&) = default; + statistics(statistics&&) noexcept = default; + statistics& operator=(const statistics&) = default; + statistics& operator=(statistics&&) noexcept = default; explicit statistics(value_type val) : m_cnt(1) @@ -77,13 +77,13 @@ public: public: // Accumulated values - inline int64_t get_count() const { return m_cnt; } - inline value_type get_min() const { return m_min; } - inline value_type get_max() const { return m_max; } - inline value_type get_sum() const { return m_sum; } - inline value_type get_sqr() const { return m_sqr; } - inline float_type get_mean() const { return static_cast(m_sum) / m_cnt; } - inline float_type get_variance() const + int64_t get_count() const { return m_cnt; } + value_type get_min() const { return m_min; } + value_type get_max() const { return m_max; } + value_type get_sum() const { return m_sum; } + value_type get_sqr() const { return m_sqr; } + float_type get_mean() const { return static_cast(m_sum) / m_cnt; } + float_type get_variance() const { if(m_cnt < 2) return (m_sum - m_sum); @@ -92,10 +92,10 @@ public: return (_sum_of_squared_samples - _sum_squared_mean) / static_cast(m_cnt - 1); } - inline float_type get_stddev() const { return ::std::sqrt(::std::abs(get_variance())); } + float_type get_stddev() const { return ::std::sqrt(::std::abs(get_variance())); } // Modifications - inline void reset() + void reset() { m_cnt = 0; m_sum = value_type{}; @@ -106,7 +106,7 @@ public: public: // Operators (value_type) - inline statistics& operator+=(value_type val) + statistics& operator+=(value_type val) { if(m_cnt == 0) { @@ -127,7 +127,7 @@ public: return *this; } - inline statistics& operator-=(value_type val) + statistics& operator-=(value_type val) { if(m_cnt > 1) --m_cnt; m_sum -= val; @@ -137,7 +137,7 @@ public: return *this; } - inline statistics& operator*=(value_type val) + statistics& operator*=(value_type val) { m_sum *= val; m_sqr *= (val * val); @@ -146,7 +146,7 @@ public: return *this; } - inline statistics& operator/=(value_type val) + statistics& operator/=(value_type val) { m_sum /= val; m_sqr /= (val * val); @@ -157,7 +157,7 @@ public: public: // Operators (this_type) - inline statistics& operator+=(const statistics& rhs) + statistics& operator+=(const statistics& rhs) { if(m_cnt == 0) { @@ -178,7 +178,7 @@ public: } // Operators (this_type) - inline statistics& operator-=(const statistics& rhs) + statistics& operator-=(const statistics& rhs) { if(m_cnt > 0) { diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp index 58773d5c00..cba611eb25 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk-tool/tool.cpp @@ -698,7 +698,7 @@ write_ring_buffer(Tb* _v, buffer_type_t type) ptr = _tmp_buf->request(false); CHECK(ptr != nullptr); } - *ptr = std::move(*reinterpret_cast(_v)); + *ptr = std::move(*_v); } template diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/helpers.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/helpers.cpp index 26fdcdd8c7..12080ca56d 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/helpers.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/helpers.cpp @@ -39,7 +39,7 @@ hsa_ven_amd_aqlprofile_id_query_t get_query_info(rocprofiler_agent_id_t agent, const counters::Metric& metric) { auto aql_agent = *CHECK_NOTNULL(rocprofiler::agent::get_aql_agent(agent)); - aqlprofile_pmc_profile_t profile{.agent = aql_agent}; + aqlprofile_pmc_profile_t profile = {.agent = aql_agent}; hsa_ven_amd_aqlprofile_id_query_t query = {metric.block().c_str(), 0, 0}; if(aqlprofile_get_pmc_info(&profile, AQLPROFILE_INFO_BLOCK_ID, &query) != HSA_STATUS_SUCCESS) { diff --git a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/tests/helpers.cpp b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/tests/helpers.cpp index 47ec458eb1..9219faa3c2 100644 --- a/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/tests/helpers.cpp +++ b/projects/rocprofiler-sdk/source/lib/rocprofiler-sdk/aql/tests/helpers.cpp @@ -103,8 +103,8 @@ findDeviceMetrics(const rocprofiler_agent_t& agent, const std::unordered_set::max()}; std::sscanf(strn.data(), "%x ", &event_id);