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