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
20 #include "xran_compression.h"
\r
21 #include "gtest/gtest.h"
\r
23 #define MAX_IQ (273*12*2)// 273 RBs, 12 SC, 32bits IQ
\r
25 int8_t iCompressionOutput_AVX_A[MAX_IQ + MAX_IQ/24]; /* 273 RB 8 bits IQ + exponent */
\r
26 int16_t iDeCompressionOutput_AVX_A[MAX_IQ]; /* 273 RB 16bits IQ */
\r
27 int16_t iCompressionInput[MAX_IQ]; /* 273 RB 16bits IQ */
\r
28 int16_t iLength = 273*12*2; // total 16bits IQ
\r
32 TEST(Compression, Zero) {
\r
33 EXPECT_EQ(0, xran_bfp_comp_avx512_fun_a(iCompressionInput,iCompressionOutput_AVX_A, iLength));
\r
38 TEST(Decompression, Zero) {
\r
40 EXPECT_EQ(0, xran_bfp_decomp_avx512_fun_a(iCompressionOutput_AVX_A,iDeCompressionOutput_AVX_A,iLength));
\r