forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ie_memcpy.h
31 lines (25 loc) · 923 Bytes
/
ie_memcpy.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Copyright (C) 2018-2023 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//
/**
* @brief Defines a ie_memcpy to safely (SDL-friendly) copy arrays
* @file ie_memcpy.h
*/
#pragma once
#include <stdlib.h>
#include "ie_api.h"
/**
* @brief Copies bytes between buffers with security enhancements
* Copies count bytes from src to dest. If the source and destination
* overlap, the behavior is undefined.
* @ingroup ie_dev_api_memory
*
* @param dest A Pointer to the object to copy to
* @param destsz A max number of bytes to modify in the destination (typically the size
* of the destination object)
* @param src A pointer to the object to copy from
* @param count A number of bytes to copy
*
* @return zero on success and non-zero value on error.
*/
INFERENCE_ENGINE_API_CPP(int) ie_memcpy(void* dest, size_t destsz, void const* src, size_t count);