Skip to content

Commit

Permalink
examples: fix read_from_memory C version function
Browse files Browse the repository at this point in the history
This closes oneapi-src#1247
  • Loading branch information
dzarukin committed Feb 11, 2022
1 parent 6ea97c2 commit ebc282e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/example_utils.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright 2019-2021 Intel Corporation
* Copyright 2019-2022 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -112,6 +112,7 @@ static inline void read_from_dnnl_memory(void *handle, dnnl_memory_t mem) {
CHECK(dnnl_memory_map_data(mem, &mapped_ptr));
if (mapped_ptr) memcpy(handle, mapped_ptr, bytes);
CHECK(dnnl_memory_unmap_data(mem, mapped_ptr));
return;
}

if (eng_kind == dnnl_cpu) {
Expand Down

0 comments on commit ebc282e

Please sign in to comment.