5#ifndef GKO_PUBLIC_CORE_LOG_PERFORMANCE_HINT_HPP_
6#define GKO_PUBLIC_CORE_LOG_PERFORMANCE_HINT_HPP_
11#include <unordered_map>
14#include <ginkgo/core/log/logger.hpp>
34 const uintptr& location)
const override;
37 const uintptr& location)
const override;
42 const size_type& num_bytes)
const override;
62 static std::unique_ptr<PerformanceHint>
create(
83 std::ostream& log()
const;
86 mutable std::unordered_map<uintptr_t, size_type> allocation_sizes_;
87 mutable std::unordered_map<size_type, int> allocation_histogram_;
88 mutable std::unordered_map<uintptr_t, int> copy_src_histogram_;
89 mutable std::unordered_map<uintptr_t, int> copy_dst_histogram_;
93 static constexpr Logger::mask_type mask_ =
94 Logger::allocation_completed_mask | Logger::free_completed_mask |
95 Logger::copy_completed_mask;
96 static constexpr const char* prefix_ =
"[PERFORMANCE] >>> ";
The first step in using the Ginkgo library consists of creating an executor.
Definition executor.hpp:616
The Ginkgo namespace.
Definition abstract_factory.hpp:20
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:775
std::uintptr_t uintptr
Unsigned integer type capable of holding a pointer to void.
Definition types.hpp:144
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:92