Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / precision_utils.h
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #pragma once
6
7 #include <cstddef>
8 #include <ie_api.h>
9
10 namespace InferenceEngine {
11
12 typedef short ie_fp16;
13
14 namespace PrecisionUtils {
15
16 INFERENCE_ENGINE_API_CPP(ie_fp16) f32tof16(float x);
17
18 INFERENCE_ENGINE_API_CPP(float) f16tof32(ie_fp16 x);
19
20 INFERENCE_ENGINE_API_CPP(void) f16tof32Arrays(float *dst, const short *src, size_t nelem, float scale = 1.f, float bias = 0.f);
21
22 INFERENCE_ENGINE_API_CPP(void) f32tof16Arrays(short *dst, const float *src, size_t nelem, float scale = 1.f, float bias = 0.f);
23
24 }  // namespace PrecisionUtils
25
26 }  // namespace InferenceEngine