33#ifndef GKO_PUBLIC_CORE_LOG_PERFORMANCE_HINT_HPP_
34#define GKO_PUBLIC_CORE_LOG_PERFORMANCE_HINT_HPP_
39#include <unordered_map>
42#include <ginkgo/core/log/logger.hpp>
62 const uintptr& location)
const override;
65 const uintptr& location)
const override;
70 const size_type& num_bytes)
const override;
90 static std::unique_ptr<PerformanceHint>
create(
111 std::ostream& log()
const;
114 mutable std::unordered_map<uintptr_t, size_type> allocation_sizes_;
115 mutable std::unordered_map<size_type, int> allocation_histogram_;
116 mutable std::unordered_map<uintptr_t, int> copy_src_histogram_;
117 mutable std::unordered_map<uintptr_t, int> copy_dst_histogram_;
121 static constexpr Logger::mask_type mask_ =
122 Logger::allocation_completed_mask | Logger::free_completed_mask |
123 Logger::copy_completed_mask;
124 static constexpr const char* prefix_ =
"[PERFORMANCE] >>> ";
The first step in using the Ginkgo library consists of creating an executor.
Definition executor.hpp:644
Definition logger.hpp:104
The Ginkgo namespace.
Definition abstract_factory.hpp:48
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:803
std::uintptr_t uintptr
Unsigned integer type capable of holding a pointer to void.
Definition types.hpp:172
std::size_t size_type
Integral type used for allocation quantities.
Definition types.hpp:120