1 /******************************************************************************
\r
3 * Copyright (c) 2019 Intel.
\r
5 * Licensed under the Apache License, Version 2.0 (the "License");
\r
6 * you may not use this file except in compliance with the License.
\r
7 * You may obtain a copy of the License at
\r
9 * http://www.apache.org/licenses/LICENSE-2.0
\r
11 * Unless required by applicable law or agreed to in writing, software
\r
12 * distributed under the License is distributed on an "AS IS" BASIS,
\r
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
14 * See the License for the specific language governing permissions and
\r
15 * limitations under the License.
\r
17 *******************************************************************************/
\r
19 /*! \file common_typedef_xran.h
\r
20 \brief This header file defines those data type both used by eNB and UE.
\r
23 #ifndef _COMMON_TYPEDEF_XRAN_H_
\r
24 #define _COMMON_TYPEDEF_XRAN_H_
\r
29 #include <stdbool.h>
\r
33 \brief Defines 64-bit complex structure; both real part and image part have 32 bit width.
\r
36 float re; /*!< 32-bit real part */
\r
37 float im; /*!< 32-bit image part */
\r
42 \struct complex_int16_t
\r
43 \brief Defines 32-bit complex structure; both real part and image part have 16 bit width.
\r
44 \brief Same defines as COMPLEX16
\r
47 int16_t re; /*!< 16-bit real part */
\r
48 int16_t im; /*!< 16-bit image part */
\r
49 }complex_int16_t,COMPLEX16;
\r
53 \struct complex_int32_t
\r
54 \brief Defines 64-bit complex structure; both real part and image part have 32 bit width.
\r
57 int32_t re; /*!< 32-bit real part */
\r
58 int32_t im; /*!< 32-bit image part */
\r
62 \struct complex_float
\r
63 \brief Defines 64-bit complex structure; both real part and image part have 32 bit width.
\r
66 float re; /*!< 32-bit real part */
\r
67 float im; /*!< 32-bit image part */
\r
71 \struct complex_double
\r
72 \brief Defines 128-bit complex structure; both real part and image part have 64 bit width.
\r
75 double re; /*!< 64-bit real part */
\r
76 double im; /*!< 64-bit image part */
\r
81 \brief half is a 16-bit IEEE floating-point standard number format.
\r
82 \note In future this will be known as `short float' or `__fp16'.
\r
83 \note Older compilers must provide proxy support for it as a plain 16-bit integer
\r
85 typedef int16_t half;
\r
88 \struct complex_half
\r
89 \brief Defines 32-bit complex structure; both real part and image part have 16 bit width.
\r
92 half re; /*!< 16-bit real part */
\r
93 half im; /*!< 16-bit image part */
\r
97 \enum instruction_cpu_support
\r
98 \brief Define instruction the CPU can support.
\r
101 CPU_GENERIC, /*!< C */
\r
102 SSE4_2, /*!< SSE4_2 */
\r
105 AVX_512, /*!< AVX512 */
\r
106 }instruction_cpu_support;
\r
109 \enum bblib_modulation_order
\r
110 \brief Common enums for modulation order.
\r
112 enum bblib_modulation_order {
\r
113 BBLIB_BPSK = 1, /*!< BPSK */
\r
114 BBLIB_QPSK = 2, /*!< QPSK */
\r
115 BBLIB_PAM4 = 3, /*!< PAM4 */
\r
116 BBLIB_QAM16 = 4, /*!< QAM16 */
\r
117 BBLIB_PAM8 = 5, /*!< PAM8 */
\r
118 BBLIB_QAM64 = 6, /*!< QAM64 */
\r
119 BBLIB_PAM16 = 7, /*!< PAM16 */
\r
120 BBLIB_QAM256 = 8 /*!< QAM256 */
\r
125 #define __align(x) __declspec(align(x))
\r
127 #define __align(x) __attribute__((aligned(x)))
\r
128 #define _aligned_malloc(x,y) memalign(y,x)
\r
131 /* Test time and loops for unit test */
\r
135 #endif /* #ifndef _COMMON_TYPEDEF_H_ */
\r