o-du/phy
Intel O-RAN/X-RAN Generated Doxygen Documentation
unittests.cc
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright (c) 2019 Intel.
4 *
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
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
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.
16 *
17 *******************************************************************************/
18 
19 #include <limits.h>
20 #include "xran_compression.h"
21 #include "gtest/gtest.h"
22 
23 #define MAX_IQ (273*12*2)// 273 RBs, 12 SC, 32bits IQ
24 
25 int8_t iCompressionOutput_AVX_A[MAX_IQ + MAX_IQ/24]; /* 273 RB 8 bits IQ + exponent */
26 int16_t iDeCompressionOutput_AVX_A[MAX_IQ]; /* 273 RB 16bits IQ */
27 int16_t iCompressionInput[MAX_IQ]; /* 273 RB 16bits IQ */
28 int16_t iLength = 273*12*2; // total 16bits IQ
29 
30 // Tests
31 /*
32 TEST(Compression, Zero) {
33  EXPECT_EQ(0, xran_bfp_comp_avx512_fun_a(iCompressionInput,iCompressionOutput_AVX_A, iLength));
34 }
35 
36 
37 
38 TEST(Decompression, Zero) {
39  iLength= 24+1;
40  EXPECT_EQ(0, xran_bfp_decomp_avx512_fun_a(iCompressionOutput_AVX_A,iDeCompressionOutput_AVX_A,iLength));
41 }*/
42 
43 
External API for compading with the use BFP algorithm.
int16_t iLength
Definition: unittests.cc:28
int16_t iDeCompressionOutput_AVX_A[MAX_IQ]
Definition: unittests.cc:26
int16_t iCompressionInput[MAX_IQ]
Definition: unittests.cc:27
#define MAX_IQ
Definition: unittests.cc:23
int8_t iCompressionOutput_AVX_A[MAX_IQ+MAX_IQ/24]
Definition: unittests.cc:25