File tree 2 files changed +5
-4
lines changed
2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ inline void finalize() {
79
79
#endif
80
80
}
81
81
82
- dnnl::engine::kind validate_engine_kind (dnnl::engine::kind akind) {
82
+ inline dnnl::engine::kind validate_engine_kind (dnnl::engine::kind akind) {
83
83
// Checking if a GPU exists on the machine
84
84
if (akind == dnnl::engine::kind::gpu) {
85
85
if (dnnl::engine::get_count (dnnl::engine::kind::gpu) == 0 ) {
@@ -94,6 +94,7 @@ dnnl::engine::kind validate_engine_kind(dnnl::engine::kind akind) {
94
94
// Exception class to indicate that the example uses a feature that is not
95
95
// available on the current systems. It is not treated as an error then, but
96
96
// just notifies a user.
97
+ // NOLINTNEXTLINE(readability-identifier-naming)
97
98
struct example_allows_unimplemented : public std ::exception {
98
99
example_allows_unimplemented (const char *message) noexcept
99
100
: message(message) {}
@@ -107,7 +108,7 @@ inline const char *engine_kind2str_upper(dnnl::engine::kind kind);
107
108
// Returns `0` on success, `1` or oneDNN error, and `2` on example error.
108
109
inline int handle_example_errors (
109
110
std::initializer_list<dnnl::engine::kind> engine_kinds,
110
- std::function<void ()> example) {
111
+ const std::function<void ()> & example) {
111
112
int exit_code = 0 ;
112
113
113
114
try {
Original file line number Diff line number Diff line change @@ -535,7 +535,7 @@ class simple_memory_pool_t {
535
535
#endif
536
536
ptr = sh_ptr.get ();
537
537
// record the map of mm size and its ptr for reuse
538
- map_size_ptr_.emplace (std::make_pair ( size, sh_ptr) );
538
+ map_size_ptr_.emplace (size, sh_ptr);
539
539
is_free_ptr_[ptr] = false ;
540
540
}
541
541
return ptr;
@@ -566,7 +566,7 @@ class simple_memory_pool_t {
566
566
= std::shared_ptr<void > {malloc (size), cpu_deletor_t {}};
567
567
ptr = sh_ptr.get ();
568
568
// record the map of mm size and its ptr for reuse
569
- map_size_ptr_.emplace (std::make_pair ( size, sh_ptr) );
569
+ map_size_ptr_.emplace (size, sh_ptr);
570
570
is_free_ptr_[ptr] = false ;
571
571
}
572
572
return ptr;
You can’t perform that action at this time.
0 commit comments